UI: Minor improvements

This commit is contained in:
Alastair Poole 2019-08-24 16:28:56 +01:00
parent c026f9d5ad
commit 203f7b96d0
5 changed files with 21 additions and 4 deletions

7
NEWS
View File

@ -1,3 +1,10 @@
============
Evisum 0.2.4
============
* Fix GUI on launch and shutdown.
* Fix tingle compilation (makefile).
============
Evisum 0.2.2
============

View File

@ -1 +1 @@
0.2.3
0.2.4

View File

@ -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);

View File

@ -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);

View File

@ -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;