Commit Graph

10 Commits

Author SHA1 Message Date
Simon Plakolb b8322c4b4b button: Add AButton class
The AButton class is designed as full a substitute to ALabel. The
GtkButton attribute 'button_' is initialized with a label. This
label can the be referenced by the subsequent inheritors of AButton
instead of the GtkLabel attribute 'label_' of ALabel.
For convenience a GtkLabel* 'label_' attribute is added to AButton.

If the button cannot be clicked it is disabled, effectively acting
like its label predecessor.

GtkButton seems to catch one-click mouse events regardless of the
flags set on it. Therefore, 'signal_pressed' is connected to a
function creating a fake GdkEventButton* and calling 'handleToggle'
(for details on this possible bug in GTK see:
https://stackoverflow.com/questions/45334911 )

In accordance with other GtkButtons (i.e. the sway/workspace ones)
set_relief(Gtk::RELIEF_NONE) is called on the 'button_' instance.
2022-10-12 10:25:29 +02:00
Alex f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Alex 6712cd05a3
Merge branch 'master' into disk 2021-11-23 13:54:17 +01:00
Ole Martin Handeland 4229e9b2ca Implemented format-{state} for cpu/disk/memory 2020-10-12 02:05:26 +02:00
Thorben Günther 12016d35bb
disk module: add state for percentage_used 2020-09-23 14:01:25 +02:00
Jan Beich 94a4d41a65 disk: make used calculation match df(1) output
Substract space only available to superuser as well.
2020-05-26 07:47:08 +00:00
Jan Beich 71b7b4e0f4 disk: properly calculate free/total size
On most Unix systems `f_blocks`, `f_bfree`, and `f_bavail` are
reported in units of `f_frsize`.
2020-05-19 10:43:45 +00:00
Alex b40cdcb5bd refactor: call parent update 2020-04-12 18:30:21 +02:00
Guillaume Maudoux f4d2ca2736 custom formatter for numbers in 'pow' units format 2019-09-25 12:53:06 +02:00
Guillaume Maudoux 1d39ef5c8e Add a disk module 2019-09-25 08:47:33 +02:00