summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-11-12 22:47:16 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-11-12 22:47:16 +0000
commit1b02c4c6ab57d6f211292f6ee4ab7a75e0420793 (patch)
tree34a3507b3e18b26dca520683dbf82e275097ca2a
parentfc5ec2b00c102f8bd667346151b3206c5e140ebb (diff)
connman gadget popup - fix sizing to scale better
-rw-r--r--src/modules/connman/e_mod_main.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/modules/connman/e_mod_main.c b/src/modules/connman/e_mod_main.c
index 67c0a339c..4f700363e 100644
--- a/src/modules/connman/e_mod_main.c
+++ b/src/modules/connman/e_mod_main.c
@@ -230,17 +230,18 @@ _e_connman_widget_size_set(E_Connman_Instance *inst, Evas_Object *widget, Evas_C
230 zone = e_gadcon_client_zone_get(inst->gcc); 230 zone = e_gadcon_client_zone_get(inst->gcc);
231 e_zone_useful_geometry_get(zone, NULL, NULL, &zw, &zh); 231 e_zone_useful_geometry_get(zone, NULL, NULL, &zw, &zh);
232 232
233 w = zw * percent_w / 100.0; 233 w = (zw * percent_w) / 100.0;
234 h = zh * percent_h / 100.0; 234 h = (zh * percent_h) / 100.0;
235 235
236 if (w < min_w) 236 min_w *= elm_config_scale_get();
237 w = min_w; 237 max_w *= elm_config_scale_get();
238 else if (w > max_w) 238 min_h *= elm_config_scale_get();
239 w = max_w; 239 max_h *= elm_config_scale_get();
240 if (h < min_h) 240
241 h = min_h; 241 if (w < min_w) w = min_w;
242 else if (h > max_h) 242 else if (w > max_w) w = max_w;
243 h = max_h; 243 if (h < min_h) h = min_h;
244 else if (h > max_h) h = max_h;
244 245
245 e_widget_size_min_set(widget, w, h); 246 e_widget_size_min_set(widget, w, h);
246} 247}
@@ -297,7 +298,7 @@ _econnman_popup_new(E_Connman_Instance *inst)
297 } 298 }
298 299
299 /* 30,40 % -- min vga, max uvga */ 300 /* 30,40 % -- min vga, max uvga */
300 _e_connman_widget_size_set(inst, list, 10, 30, 192, 192, 384, 384); 301 _e_connman_widget_size_set(inst, list, 10, 30, 192, 240, 360, 400);
301 e_gadcon_popup_content_set(inst->popup, list); 302 e_gadcon_popup_content_set(inst->popup, list);
302 e_comp_object_util_autoclose(inst->popup->comp_object, _econnman_popup_del, NULL, inst); 303 e_comp_object_util_autoclose(inst->popup->comp_object, _econnman_popup_del, NULL, inst);
303 e_gadcon_popup_show(inst->popup); 304 e_gadcon_popup_show(inst->popup);