[gnome-panel] update background when PanelAppletFrame size changes
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] update background when PanelAppletFrame size changes
- Date: Mon, 24 Nov 2014 03:35:50 +0000 (UTC)
commit 144f249402f8b18430ddbc2e6b51d329fab18d48
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Nov 21 05:20:24 2014 +0200
update background when PanelAppletFrame size changes
When PanelAppletFrame changes size update applets background. This
is possible fix for bug:
https://bugzilla.gnome.org/show_bug.cgi?id=500999
gnome-panel/panel-applet-frame.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/gnome-panel/panel-applet-frame.c b/gnome-panel/panel-applet-frame.c
index cc76e8a..948d77c 100644
--- a/gnome-panel/panel-applet-frame.c
+++ b/gnome-panel/panel-applet-frame.c
@@ -221,6 +221,25 @@ panel_applet_frame_get_preferred_height(GtkWidget *widget, gint *minimal_height,
}
static void
+change_background (PanelAppletFrame *frame,
+ GtkAllocation *old,
+ GtkAllocation *new)
+{
+ PanelBackgroundType type;
+
+ if (old->x == new->x &&
+ old->y == new->y &&
+ old->width == new->width &&
+ old->height == new->height)
+ return;
+
+ type = frame->priv->panel->background.type;
+
+ PANEL_APPLET_FRAME_GET_CLASS (frame)->change_background (frame,
+ type);
+}
+
+static void
panel_applet_frame_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
@@ -239,10 +258,12 @@ panel_applet_frame_size_allocate (GtkWidget *widget,
if (!frame->priv->has_handle) {
GTK_WIDGET_CLASS (panel_applet_frame_parent_class)->size_allocate (widget,
allocation);
+ change_background (frame, &widget_allocation, allocation);
return;
}
gtk_widget_set_allocation (widget, allocation);
+ change_background (frame, &widget_allocation, allocation);
frame->priv->handle_rect.x = 0;
frame->priv->handle_rect.y = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]