Commit Graph

7 Commits

Author SHA1 Message Date
Simon Plakolb
5e9bbe5c76 modules: Revert button to label 2022-11-24 13:08:16 +01:00
Simon Plakolb
2b735f44bc modules: Set tooltip on button
Mouse-over tooltips set on the label only appear once the mouse hovers
over exactly the label. Other apps (e.g. firefox) show the tooltip once
the pointer hovers the button. Not solely its label. With this commit we
get the same behaviour.
2022-10-12 10:25:30 +02:00
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
Rene D. Obermueller
4e3f91d237 Issue 1226/1497: align updates with times divisible by interval 2022-04-16 14:21:28 +02:00
Rene D. Obermueller
e5d05baba3 Issue 1226/1497: Replace sleep_until with sleep_for to prevent clock from getting stuck with system time adjustment 2022-04-16 14:21:28 +02:00
Alex
f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Laurent Arnoud
96d965fe04
Add simpleclock as fallback when hhdate is not available
ref https://github.com/Alexays/Waybar/issues/668
2020-10-29 19:40:28 +01:00