summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-01-11 16:21:34 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-01-11 16:21:34 -0500
commitafd6a33e20ecc1d5c418ee31cd3099e8464919e9 (patch)
tree2757e04099ff4f109091d83f8a1c6975a492639c
parent8a4802a1f9e411b52df62b870d5b77a6487b9d1b (diff)
restore tooltips to using table instead of box
?
-rw-r--r--src/wireless.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/wireless.c b/src/wireless.c
index 0e4cee8..fe94524 100644
--- a/src/wireless.c
+++ b/src/wireless.c
@@ -1267,7 +1267,7 @@ _wireless_gadget_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Ob
1267} 1267}
1268 1268
1269static Evas_Object * 1269static Evas_Object *
1270_wireless_tooltip_row(Evas_Object *tb, const char *label, const char *value) 1270_wireless_tooltip_row(Evas_Object *tb, const char *label, const char *value, int row)
1271{ 1271{
1272 Evas_Object *lbl; 1272 Evas_Object *lbl;
1273 1273
@@ -1275,13 +1275,13 @@ _wireless_tooltip_row(Evas_Object *tb, const char *label, const char *value)
1275 evas_object_show(lbl); 1275 evas_object_show(lbl);
1276 evas_object_size_hint_align_set(lbl, 0, 0.5); 1276 evas_object_size_hint_align_set(lbl, 0, 0.5);
1277 elm_object_text_set(lbl, label); 1277 elm_object_text_set(lbl, label);
1278 elm_box_pack_end(tb, lbl); 1278 elm_table_pack(tb, lbl, 0, row, 1, 1);
1279 1279
1280 lbl = elm_label_add(tb); 1280 lbl = elm_label_add(tb);
1281 evas_object_show(lbl); 1281 evas_object_show(lbl);
1282 evas_object_size_hint_align_set(lbl, 0, 0.5); 1282 evas_object_size_hint_align_set(lbl, 0, 0.5);
1283 elm_object_text_set(lbl, value); 1283 elm_object_text_set(lbl, value);
1284 elm_box_pack_end(tb, lbl); 1284 elm_table_pack(tb, lbl, 1, row, 1, 1);
1285 return lbl; 1285 return lbl;
1286} 1286}
1287 1287
@@ -1305,6 +1305,7 @@ static Evas_Object *
1305_wireless_tooltip(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, Evas_Object *tooltip) 1305_wireless_tooltip(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, Evas_Object *tooltip)
1306{ 1306{
1307 Evas_Object *tb; 1307 Evas_Object *tb;
1308 int row = 0;
1308 char buf[1024]; 1309 char buf[1024];
1309 int type = WIRELESS_SERVICE_TYPE_WIFI; 1310 int type = WIRELESS_SERVICE_TYPE_WIFI;
1310 1311
@@ -1319,16 +1320,15 @@ _wireless_tooltip(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, Evas_Obj
1319 } 1320 }
1320 return NULL; 1321 return NULL;
1321 } 1322 }
1322 tb = elm_box_add(tooltip); 1323 tb = elm_table_add(tooltip);
1323 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 1324 elm_table_padding_set(tb, 5, 1);
1324 evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
1325 1325
1326 _wireless_tooltip_row(tb, _("Name:"), wireless_current[type]->wn->name); 1326 _wireless_tooltip_row(tb, _("Name:"), wireless_current[type]->wn->name, row++);
1327 inst->tooltip.method = _wireless_tooltip_row(tb, _("Method:"), _wireless_tooltip_method_name()); 1327 inst->tooltip.method = _wireless_tooltip_row(tb, _("Method:"), _wireless_tooltip_method_name(), row++);
1328 1328
1329 inst->tooltip.address = _wireless_tooltip_row(tb, _("Address:"), wireless_current[type]->address); 1329 inst->tooltip.address = _wireless_tooltip_row(tb, _("Address:"), wireless_current[type]->address, row++);
1330 snprintf(buf, sizeof(buf), "%u%%", wireless_current[type]->wn->strength); 1330 snprintf(buf, sizeof(buf), "%u%%", wireless_current[type]->wn->strength);
1331 inst->tooltip.signal = _wireless_tooltip_row(tb, _("Signal:"), buf); 1331 inst->tooltip.signal = _wireless_tooltip_row(tb, _("Signal:"), buf, row++);
1332 1332
1333 evas_object_event_callback_add(tb, EVAS_CALLBACK_DEL, _wireless_tooltip_del, inst); 1333 evas_object_event_callback_add(tb, EVAS_CALLBACK_DEL, _wireless_tooltip_del, inst);
1334 return tb; 1334 return tb;