summaryrefslogtreecommitdiff
path: root/endless
diff options
context:
space:
mode:
authorMatt Watson <mattdangerw@gmail.com>2013-05-30 23:46:29 -0700
committerMatt Watson <mattdangerw@gmail.com>2013-06-12 12:28:59 -0700
commit265f791d107f141213c2cf66d38dfc541f065702 (patch)
tree88dc9e7ef656e9d9da023fc643eb0ac93228460c /endless
parent70562a2862ddc1c10dd59f010e624daf21ad47b1 (diff)
EosWindow size allocate ignores border-width.
Background is drawn in an internal widget so using the border width would prevent it from drawing full screen. [endlessm/eos-sdk#88]
Diffstat (limited to 'endless')
-rw-r--r--endless/eoswindow.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/endless/eoswindow.c b/endless/eoswindow.c
index 60289ac..7e0d471 100644
--- a/endless/eoswindow.c
+++ b/endless/eoswindow.c
@@ -38,7 +38,8 @@
#define BACKGROUND_FRAME_NAME_TEMPLATE "_window-background-%d"
#define BACKGROUND_FRAME_CSS_TEMPLATE "#%s { background-image: url(\"%s\");" \
- " background-size:100%% 100%%; }"
+ " background-size:100%% 100%%;" \
+ " border-width: 0px; }"
G_DEFINE_TYPE (EosWindow, eos_window, GTK_TYPE_APPLICATION_WINDOW)
@@ -146,8 +147,9 @@ update_page_background (EosWindow *self)
gchar *next_background_css = g_strdup_printf (BACKGROUND_FRAME_CSS_TEMPLATE,
gtk_widget_get_name (self->priv->next_background),
background_uri);
- gchar *background_css = g_strconcat(self->priv->current_background_css, next_background_css, NULL);
- printf("%s\n", background_css);
+ gchar *background_css = g_strconcat(self->priv->current_background_css,
+ next_background_css,
+ NULL);
GtkStyleProvider *provider =
GTK_STYLE_PROVIDER (self->priv->background_provider);
GdkScreen *screen = gdk_screen_get_default ();
@@ -342,16 +344,7 @@ eos_window_size_allocate (GtkWidget *widget,
because it always assumes that its child begins at (0, 0). */
child = gtk_bin_get_child (GTK_BIN (self));
if (child != NULL)
- {
- border_width = gtk_container_get_border_width (GTK_CONTAINER (self));
- child_allocation.x += border_width;
- child_allocation.y += border_width;
- child_allocation.width -= 2 * border_width;
- child_allocation.height -= 2 * border_width;
- child_allocation.width = MAX(1, child_allocation.width);
- child_allocation.height = MAX(1, child_allocation.height);
gtk_widget_size_allocate (child, &child_allocation);
- }
}
static void