[Xfce4-commits] <xfce4-panel:devel> Update XfcePanelImage on theme changes.
Nick Schermer
noreply at xfce.org
Wed Feb 17 12:28:01 CET 2010
Updating branch refs/heads/devel
to 478e91d4f29c9afdc89983c9113d7132543a88ec (commit)
from 8724790289311fe9d9810fd9ee39cf833fbb4534 (commit)
commit 478e91d4f29c9afdc89983c9113d7132543a88ec
Author: Nick Schermer <nick at xfce.org>
Date: Wed Feb 17 10:27:53 2010 +0100
Update XfcePanelImage on theme changes.
libxfce4panel/xfce-panel-image.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/libxfce4panel/xfce-panel-image.c b/libxfce4panel/xfce-panel-image.c
index 44c8716..de996ae 100644
--- a/libxfce4panel/xfce-panel-image.c
+++ b/libxfce4panel/xfce-panel-image.c
@@ -344,8 +344,6 @@ xfce_panel_image_size_allocate (GtkWidget *widget,
}
else
{
- screen = gtk_widget_get_screen (widget);
-
size = MIN (priv->width, priv->height);
if (G_UNLIKELY (priv->force_icon_sizes && size < 32))
{
@@ -360,6 +358,7 @@ xfce_panel_image_size_allocate (GtkWidget *widget,
}
/* get a pixbuf from the icon name */
+ screen = gtk_widget_get_screen (widget);
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_for_screen (screen),
priv->source, size, 0, NULL);
@@ -433,6 +432,15 @@ xfce_panel_image_style_set (GtkWidget *widget,
if (priv->size > 0)
gtk_widget_queue_resize (widget);
}
+
+ /* update the icon if we have an icon-name source */
+ if (previous_style != NULL && priv->source != NULL
+ && !g_path_is_absolute (priv->source))
+ {
+ /* unset the size to force an update */
+ priv->width = priv->height = -1;
+ gtk_widget_queue_resize (widget);
+ }
}
More information about the Xfce4-commits
mailing list