summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2020-05-20 11:16:07 +0100
committerAlastair Poole <netstar@gmail.com>2020-05-20 11:16:07 +0100
commit01be01dd9714d9801fa1f36aee829943aa34809c (patch)
tree1d95793b48d4a9bb8b11ce6fa28212f81624387a
parent252abddf9cb6d766c893341c79d2a6830cec19b1 (diff)
proc_view: fix top "tab" buttons
-rw-r--r--src/bin/main.c2
-rw-r--r--src/bin/ui/ui_process_view.c64
2 files changed, 40 insertions, 26 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index 62339c2..a09486a 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -1,8 +1,6 @@
1/* 1/*
2 * Copyright 2018-2019. Alastair Poole <netstar@gmail.com> 2 * Copyright 2018-2019. Alastair Poole <netstar@gmail.com>
3 * 3 *
4 * http://haxlab.org.
5 *
6 * See LICENSE file for details. 4 * See LICENSE file for details.
7 */ 5 */
8 6
diff --git a/src/bin/ui/ui_process_view.c b/src/bin/ui/ui_process_view.c
index 19957c6..9a852bc 100644
--- a/src/bin/ui/ui_process_view.c
+++ b/src/bin/ui/ui_process_view.c
@@ -895,63 +895,79 @@ _btn_info_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info
895static Evas_Object * 895static Evas_Object *
896_tabs_add(Evas_Object *parent, Ui_Process *ui) 896_tabs_add(Evas_Object *parent, Ui_Process *ui)
897{ 897{
898 Evas_Object *hbox, *btn, *border; 898 Evas_Object *hbox, *pad, *btn;
899 899
900 hbox = elm_box_add(parent); 900 hbox = elm_box_add(parent);
901 evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, 0); 901 evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, 0);
902 evas_object_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL); 902 evas_object_size_hint_align_set(hbox, EVAS_HINT_FILL, 0.5);
903 elm_box_horizontal_set(hbox, EINA_TRUE); 903 elm_box_horizontal_set(hbox, EINA_TRUE);
904 elm_box_homogeneous_set(hbox, EINA_TRUE);
905 evas_object_show(hbox); 904 evas_object_show(hbox);
906 905
907 border = elm_frame_add(parent); 906 pad = elm_frame_add(parent);
908 evas_object_size_hint_weight_set(border, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 907 elm_object_style_set(pad, "pad_medium");
909 evas_object_size_hint_align_set(border, EVAS_HINT_FILL, EVAS_HINT_FILL); 908 evas_object_size_hint_weight_set(pad, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
910 elm_object_style_set(border, "pad_small"); 909 evas_object_size_hint_align_set(pad, EVAS_HINT_FILL, EVAS_HINT_FILL);
911 evas_object_show(border); 910 evas_object_show(pad);
911 elm_box_pack_end(hbox, pad);
912
913 pad = elm_frame_add(parent);
914 elm_object_style_set(pad, "pad_small");
915 evas_object_size_hint_weight_set(pad, 0.0, EVAS_HINT_EXPAND);
916 evas_object_size_hint_align_set(pad, EVAS_HINT_FILL, EVAS_HINT_FILL);
917 evas_object_show(pad);
912 918
913 ui->btn_main = btn = elm_button_add(parent); 919 ui->btn_main = btn = elm_button_add(parent);
914 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 920 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
915 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); 921 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
922 evas_object_size_hint_min_set(btn, TAB_BTN_SIZE * elm_config_scale_get(), 1);
916 elm_object_text_set(btn, _("Process")); 923 elm_object_text_set(btn, _("Process"));
917 elm_object_disabled_set(btn, EINA_TRUE); 924 elm_object_disabled_set(btn, EINA_TRUE);
918 evas_object_show(btn); 925 evas_object_show(btn);
919 elm_object_content_set(border, btn); 926 elm_object_content_set(pad, btn);
920 elm_box_pack_end(hbox, border); 927 elm_box_pack_end(hbox, pad);
921 evas_object_smart_callback_add(btn, "clicked", _btn_process_clicked_cb, ui); 928 evas_object_smart_callback_add(btn, "clicked", _btn_process_clicked_cb, ui);
922 929
923 border = elm_frame_add(parent); 930 pad = elm_frame_add(parent);
924 evas_object_size_hint_weight_set(border, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 931 elm_object_style_set(pad, "pad_small");
925 evas_object_size_hint_align_set(border, EVAS_HINT_FILL, EVAS_HINT_FILL); 932 evas_object_size_hint_weight_set(pad, 0.0, EVAS_HINT_EXPAND);
926 elm_object_style_set(border, "pad_small"); 933 evas_object_size_hint_align_set(pad, EVAS_HINT_FILL, EVAS_HINT_FILL);
927 evas_object_show(border); 934 evas_object_show(pad);
928 935
929 ui->btn_thread = btn = elm_button_add(parent); 936 ui->btn_thread = btn = elm_button_add(parent);
930 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 937 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
931 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); 938 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
939 evas_object_size_hint_min_set(btn, TAB_BTN_SIZE * elm_config_scale_get(), 1);
932 elm_object_text_set(btn, _("Threads")); 940 elm_object_text_set(btn, _("Threads"));
933 elm_object_disabled_set(btn, EINA_FALSE); 941 elm_object_disabled_set(btn, EINA_FALSE);
934 evas_object_show(btn); 942 evas_object_show(btn);
935 elm_object_content_set(border, btn); 943 elm_object_content_set(pad, btn);
936 elm_box_pack_end(hbox, border); 944 elm_box_pack_end(hbox, pad);
937 evas_object_smart_callback_add(btn, "clicked", _btn_threads_clicked_cb, ui); 945 evas_object_smart_callback_add(btn, "clicked", _btn_threads_clicked_cb, ui);
938 946
939 border = elm_frame_add(parent); 947 pad = elm_frame_add(parent);
940 evas_object_size_hint_weight_set(border, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 948 elm_object_style_set(pad, "pad_small");
941 evas_object_size_hint_align_set(border, EVAS_HINT_FILL, EVAS_HINT_FILL); 949 evas_object_size_hint_weight_set(pad, 0.0, EVAS_HINT_EXPAND);
942 elm_object_style_set(border, "pad_small"); 950 evas_object_size_hint_align_set(pad, EVAS_HINT_FILL, EVAS_HINT_FILL);
943 evas_object_show(border); 951 evas_object_show(pad);
944 952
945 ui->btn_info = btn = elm_button_add(parent); 953 ui->btn_info = btn = elm_button_add(parent);
946 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 954 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
947 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); 955 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
956 evas_object_size_hint_min_set(btn, TAB_BTN_SIZE * elm_config_scale_get(), 1);
948 elm_object_text_set(btn, _("Information")); 957 elm_object_text_set(btn, _("Information"));
949 elm_object_disabled_set(btn, EINA_FALSE); 958 elm_object_disabled_set(btn, EINA_FALSE);
950 evas_object_show(btn); 959 evas_object_show(btn);
951 elm_object_content_set(border, btn); 960 elm_object_content_set(pad, btn);
952 elm_box_pack_end(hbox, border); 961 elm_box_pack_end(hbox, pad);
953 evas_object_smart_callback_add(btn, "clicked", _btn_info_clicked_cb, ui); 962 evas_object_smart_callback_add(btn, "clicked", _btn_info_clicked_cb, ui);
954 963
964 pad = elm_frame_add(parent);
965 elm_object_style_set(pad, "pad_medium");
966 evas_object_size_hint_weight_set(pad, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
967 evas_object_size_hint_align_set(pad, EVAS_HINT_FILL, EVAS_HINT_FILL);
968 evas_object_show(pad);
969 elm_box_pack_end(hbox, pad);
970
955 return hbox; 971 return hbox;
956} 972}
957 973