diff options
| author | Federico Angelilli <code@fedang.net> | 2023-12-07 16:09:20 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2023-12-07 16:09:20 +0100 |
| commit | 4b83ba02939ad7692ebd7e71161d37eabe4b73e3 (patch) | |
| tree | 254478db8fd094ea4ae914605e418a8f94c8ea09 /src/comet.c | |
| parent | 7da583328758e3e8e3ace381aab9e98313f76767 (diff) | |
Tweak some buttons
Diffstat (limited to 'src/comet.c')
| -rw-r--r-- | src/comet.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/comet.c b/src/comet.c index d6fc0d1..4945bb2 100644 --- a/src/comet.c +++ b/src/comet.c @@ -121,7 +121,7 @@ static gboolean cpu_update(gpointer data) state_redraw(btn->action_data, len1 != len2); } - log_debug("Updated cpu percentage"); + log_debug("%s cpu percentage", perc != NULL ? "Updated" : "Unchanged"); return G_SOURCE_CONTINUE; } @@ -234,7 +234,7 @@ static void register_buttons(State *state, Color color, Color line_color, Color // Cpu usage button Button *cpu_btn = button_simple_create(PANGO_ALIGN_RIGHT, color, line_color); - button_simple_set_text(cpu_btn, g_strdup(" ?%"), text_color); + button_simple_set_text(cpu_btn, g_strdup(" 0%"), text_color); button_simple_set_action(cpu_btn, show_action, state); state_add_button(state, cpu_btn); @@ -297,7 +297,7 @@ int main(int argc, char **argv) Color color = { 0.4, 0.4, 0.4, 1 }; Color line_color = { 0.8, 0.8, 0.8, 1 }; - Color text_color = { 0.8, 0.8, 0.8, 1 }; + Color text_color = { 0.9, 0.9, 0.9, 1 }; register_buttons(state, color, line_color, text_color); // Buttons with special handling @@ -327,9 +327,9 @@ int main(int argc, char **argv) button_simple_set_action(q_btn, quit_action, mainloop); state_add_button(state, q_btn); - // Test button group - Color orange = { 1, 0.647, 0, 1 }; - Button *group = button_group_create(PANGO_ALIGN_LEFT, orange, line_color); + // Menu button(s) + Color grey = { 0.5, 0.5, 0.5, 1 }; + Button *group = button_group_create(PANGO_ALIGN_LEFT, grey, line_color); Button *child1 = button_simple_create(PANGO_ALIGN_CENTER, color, line_color); button_set_padding(child1, 1); |
