From 214c57e2103c1537de1663f09d6d7c37e1bb5d8f Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 10 Dec 2012 11:30:33 +0000 Subject: [PATCH] use correct geom for systray icon scaling, also clamp to shelf size SVN revision: 80596 --- src/modules/systray/e_mod_main.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/modules/systray/e_mod_main.c b/src/modules/systray/e_mod_main.c index 00e1d5087..91d557508 100644 --- a/src/modules/systray/e_mod_main.c +++ b/src/modules/systray/e_mod_main.c @@ -335,11 +335,34 @@ _systray_icon_add(Instance *inst, const Ecore_X_Window win) h = w; /* assuming systray must be on a shelf here */ - sz = MIN(inst->gcc->gadcon->shelf->w, inst->gcc->gadcon->shelf->h); + switch (inst->gcc->gadcon->orient) + { + case E_GADCON_ORIENT_HORIZ: + case E_GADCON_ORIENT_TOP: + case E_GADCON_ORIENT_BOTTOM: + case E_GADCON_ORIENT_CORNER_TL: + case E_GADCON_ORIENT_CORNER_TR: + case E_GADCON_ORIENT_CORNER_BL: + case E_GADCON_ORIENT_CORNER_BR: + sz = inst->gcc->gadcon->shelf->h; + break; + + case E_GADCON_ORIENT_VERT: + case E_GADCON_ORIENT_LEFT: + case E_GADCON_ORIENT_RIGHT: + case E_GADCON_ORIENT_CORNER_LT: + case E_GADCON_ORIENT_CORNER_RT: + case E_GADCON_ORIENT_CORNER_LB: + case E_GADCON_ORIENT_CORNER_RB: + default: + sz = inst->gcc->gadcon->shelf->w; + } if ((w < 16) && (sz > 16)) w = h = sz - 5; w = h = e_util_icon_size_normalize(w); + if (w > sz - 5) + w = h = e_util_icon_size_normalize(sz - 5); o = evas_object_rectangle_add(inst->evas); if (!o)