netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=203f7b96d0c7821595cbbdfee46f088ff8b7c4fd

commit 203f7b96d0c7821595cbbdfee46f088ff8b7c4fd
Author: Alastair Poole <nets...@gmail.com>
Date:   Sat Aug 24 16:28:56 2019 +0100

    UI: Minor improvements
---
 NEWS       | 7 +++++++
 VERSION    | 2 +-
 src/main.c | 2 +-
 src/ui.c   | 7 +++++++
 src/ui.h   | 7 +++++--
 5 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index 7c43e3f..0110f18 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+============
+Evisum 0.2.4
+============
+
+   * Fix GUI on launch and shutdown.
+   * Fix tingle compilation (makefile).
+
 ============
 Evisum 0.2.2
 ============
diff --git a/VERSION b/VERSION
index 7179039..abd4105 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.2.3
+0.2.4
diff --git a/src/main.c b/src/main.c
index 8a36f06..869ccff 100644
--- a/src/main.c
+++ b/src/main.c
@@ -30,7 +30,7 @@ _win_add(void)
    icon = elm_icon_add(win);
    elm_icon_standard_set(icon, "evisum");
    elm_win_icon_object_set(win, icon);
-   evas_object_resize(win, 400 * elm_config_scale_get(), 450 * 
elm_config_scale_get());
+   evas_object_resize(win, EVISUM_SIZE_WIDTH * elm_config_scale_get(), 
EVISUM_SIZE_HEIGHT * elm_config_scale_get());
    elm_win_title_set(win, "System Information");
    elm_win_center(win, EINA_TRUE, EINA_TRUE);
 
diff --git a/src/ui.c b/src/ui.c
index fb1113e..296785f 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1342,6 +1342,8 @@ _ui_system_view_add(Ui *ui)
    evas_object_show(frame);
    elm_object_content_set(frame, scroller);
 
+
+
    button = elm_button_add(parent);
    _btn_icon_state_set(button, EINA_FALSE);
    evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, 0);
@@ -2110,6 +2112,7 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
    elm_object_disabled_set(ui->btn_general, EINA_TRUE);
    evas_object_size_hint_weight_set(button, 1.0, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_min_set(button, TAB_BTN_SIZE * 
elm_config_scale_get(), 0);
    elm_object_text_set(button, "General");
    evas_object_show(button);
    elm_box_pack_end(hbox, button);
@@ -2118,6 +2121,7 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
    ui->btn_cpu = button = elm_button_add(hbox);
    evas_object_size_hint_weight_set(button, 1.0, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_min_set(button, TAB_BTN_SIZE * 
elm_config_scale_get(), 0);
    elm_object_text_set(button, "CPU");
    evas_object_show(button);
    elm_box_pack_end(hbox, button);
@@ -2126,6 +2130,7 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
    ui->btn_mem = button = elm_button_add(hbox);
    evas_object_size_hint_weight_set(button, 1.0, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_min_set(button, TAB_BTN_SIZE * 
elm_config_scale_get(), 0);
    elm_object_text_set(button, "Memory");
    evas_object_show(button);
    elm_box_pack_end(hbox, button);
@@ -2134,6 +2139,7 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
    ui->btn_storage = button = elm_button_add(hbox);
    evas_object_size_hint_weight_set(button, 1.0, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_min_set(button, TAB_BTN_SIZE * 
elm_config_scale_get(), 0);
    elm_object_text_set(button, "Storage");
    evas_object_show(button);
    elm_box_pack_end(hbox, button);
@@ -2142,6 +2148,7 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
    ui->btn_misc = button = elm_button_add(hbox);
    evas_object_size_hint_weight_set(button, 1.0, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_min_set(button, TAB_BTN_SIZE * 
elm_config_scale_get(), 0);
    elm_object_text_set(button, "Misc");
    evas_object_show(button);
    elm_box_pack_end(hbox, button);
diff --git a/src/ui.h b/src/ui.h
index 0b82881..2aa8236 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -1,8 +1,11 @@
-#ifndef __UI_H__
+ #ifndef __UI_H__
 #define __UI_H__
 
 #include <Elementary.h>
 
+#define EVISUM_SIZE_WIDTH  500
+#define EVISUM_SIZE_HEIGHT 560
+
 typedef enum
 {
    PROCESS_INFO_FIELD_PID,
@@ -53,7 +56,7 @@ typedef struct Ui
    Evas_Object  *panel;
    Evas_Object  *scroller;
    Evas_Object  *content;
-
+#define TAB_BTN_SIZE 75
    Evas_Object  *btn_general;
    Evas_Object  *btn_cpu;
    Evas_Object  *btn_mem;

-- 


Reply via email to