raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=490e46bfa9b664cb623533c450f01b09041f28f9

commit 490e46bfa9b664cb623533c450f01b09041f28f9
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Feb 9 22:04:48 2021 +0000

    systray - fix sizing to use gadget size not shelf/parent for icon
    
    the sizing in systray is a bit... nadff. quick and dirty fix.
    
    @fix
---
 src/modules/systray/e_mod_main.c          |  4 ++--
 src/modules/systray/e_mod_notifier_host.c | 24 ++++++++++++++----------
 2 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/src/modules/systray/e_mod_main.c b/src/modules/systray/e_mod_main.c
index 1a94cd33b..1cc229378 100644
--- a/src/modules/systray/e_mod_main.c
+++ b/src/modules/systray/e_mod_main.c
@@ -9,8 +9,8 @@ static E_Module *systray_mod = NULL;
 static Systray_Context *ctx = NULL;
 static char tmpbuf[4096]; /* general purpose buffer, just use immediately */
 
-#define SYSTRAY_MIN_W 16
-#define SYSTRAY_MIN_H 8
+#define SYSTRAY_MIN_W 4
+#define SYSTRAY_MIN_H 4
 
 static Eina_Bool
 _systray_site_is_safe(E_Gadcon_Site site)
diff --git a/src/modules/systray/e_mod_notifier_host.c 
b/src/modules/systray/e_mod_notifier_host.c
index a90e0239e..a1ca4a3ea 100644
--- a/src/modules/systray/e_mod_notifier_host.c
+++ b/src/modules/systray/e_mod_notifier_host.c
@@ -294,11 +294,13 @@ image_scale(Instance_Notifier_Host *notifier_inst, 
Notifier_Item_Icon *ii)
       case E_GADCON_ORIENT_CORNER_TR:
       case E_GADCON_ORIENT_CORNER_BL:
       case E_GADCON_ORIENT_CORNER_BR:
-        if (systray_gadcon_get(notifier_inst->inst)->shelf)
-          sz = systray_gadcon_get(notifier_inst->inst)->shelf->h;
-        else
-          evas_object_geometry_get(notifier_inst->inst->gcc->o_frame ?:
-            notifier_inst->inst->gcc->o_base, NULL, NULL, NULL, &sz);
+//        if (systray_gadcon_get(notifier_inst->inst)->shelf)
+//          sz = systray_gadcon_get(notifier_inst->inst)->shelf->h;
+//        else
+//          evas_object_geometry_get(notifier_inst->inst->gcc->o_frame ?:
+//            notifier_inst->inst->gcc->o_base, NULL, NULL, NULL, &sz);
+          evas_object_geometry_get(notifier_inst->inst->ui.gadget,
+                                   NULL, NULL, NULL, &sz);
         break;
 
       case E_GADCON_ORIENT_VERT:
@@ -309,11 +311,13 @@ image_scale(Instance_Notifier_Host *notifier_inst, 
Notifier_Item_Icon *ii)
       case E_GADCON_ORIENT_CORNER_LB:
       case E_GADCON_ORIENT_CORNER_RB:
       default:
-        if (systray_gadcon_get(notifier_inst->inst)->shelf)
-          sz = systray_gadcon_get(notifier_inst->inst)->shelf->w;
-        else
-          evas_object_geometry_get(notifier_inst->inst->gcc->o_frame ?:
-            notifier_inst->inst->gcc->o_base, NULL, NULL, &sz, NULL);
+//        if (systray_gadcon_get(notifier_inst->inst)->shelf)
+//          sz = systray_gadcon_get(notifier_inst->inst)->shelf->w;
+//        else
+//          evas_object_geometry_get(notifier_inst->inst->gcc->o_frame ?:
+//            notifier_inst->inst->gcc->o_base, NULL, NULL, &sz, NULL);
+          evas_object_geometry_get(notifier_inst->inst->ui.gadget,
+                                   NULL, NULL, &sz, NULL);
         break;
      }
    sz = sz - 5;

-- 


Reply via email to