netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=4ffe0a1672044b3bb65eabfabccb9e30ab289d95

commit 4ffe0a1672044b3bb65eabfabccb9e30ab289d95
Author: Alastair Poole <[email protected]>
Date:   Sun Jun 7 18:05:13 2020 +0100

    ui: don't let button stretch.
---
 src/bin/ui/ui.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/ui.c b/src/bin/ui/ui.c
index 3288968..d655a7d 100644
--- a/src/bin/ui/ui.c
+++ b/src/bin/ui/ui.c
@@ -1402,7 +1402,6 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
    elm_box_pack_end(box, border);
 
    border = elm_frame_add(parent);
-   evas_object_size_hint_weight_set(border, 0.1, 0);
    evas_object_size_hint_align_set(border, FILL, FILL);
    elm_object_style_set(border, "pad_small");
    evas_object_show(border);
@@ -1410,6 +1409,8 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
    button = elm_button_add(parent);
    evas_object_size_hint_weight_set(button, EXPAND, EXPAND);
    evas_object_size_hint_align_set(button, FILL, FILL);
+   evas_object_size_hint_min_set(button,
+                   TAB_BTN_SIZE * elm_config_scale_get(), 0),
    elm_object_text_set(button, _("Close"));
    elm_object_content_set(border, button);
    elm_box_pack_end(box, border);
@@ -1475,9 +1476,9 @@ evisum_size_format(unsigned long long bytes)
    while (value > 1024)
      {
        if ((value / 1024) < powi) break;
-       if (unit[1] == '\0') break;
        powi *= 1024;
        ++unit;
+       if (unit[1] == '\0') break;
      }
 
    if (*unit == 'B') precision = 0;

-- 


Reply via email to