[yocto] [matchbox-panel-2][PATCH] applets/systray: Allow icons to be smaller
Jussi Kukkonen
jussi.kukkonen at intel.com
Tue Oct 4 00:38:44 PDT 2016
Don't expand/fill the systray items, align them in the center of the
systray panel. This makes sure the icons are drawn at the size they
expect.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen at intel.com>
---
This is related to [YOCTO #9995]: GtkStatusIcon based systray items
render weirdly if the get allocated more space than they expected.
applets/systray/systray.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/applets/systray/systray.c b/applets/systray/systray.c
index 39698a8..94a5753 100644
--- a/applets/systray/systray.c
+++ b/applets/systray/systray.c
@@ -29,8 +29,9 @@ on_realize (GtkWidget *widget, gpointer user_data)
tray = (GtkWidget *)na_tray_new_for_screen (screen, orientation);
gtk_widget_show (tray);
-
- gtk_container_add (GTK_CONTAINER (widget), tray);
+ gtk_widget_set_valign (tray, GTK_ALIGN_CENTER);
+ gtk_widget_set_halign (tray, GTK_ALIGN_CENTER);
+ gtk_box_pack_start (GTK_BOX (widget), tray, FALSE, FALSE, 0);
}
G_MODULE_EXPORT GtkWidget *
--
2.9.3
More information about the yocto
mailing list