summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/matchbox-panel-2/files/0001-applets-systray-Allow-icons-to-be-smaller.patch
blob: d13dd3d5a0b78569f33c8f5effa4c2c213fa69e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From f83a9179696b2d060ee4860733dafbf38bbd4b87 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Wed, 28 Sep 2016 15:05:41 +0300
Subject: [PATCH] applets/systray: Allow icons to be smaller

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@intel.com>
Upstream-Status: Submitted
---
 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.1.4