Commit Graph

30 Commits

Author SHA1 Message Date
Aleksei Bavshin
ea17a66dfc
fix: compilation errors with cpp_std=c++20
There were two main issues with fmtlib and C++20 mode:

 - `fmt::format` defaults to compile-time argument checking and requires
   using `fmt::runtime(format_string)` to bypass that.
 - `std::format` implementation introduces conflicting declarations and
   we have to specify the namespace for all `format`/`format_to` calls.
2023-01-20 22:50:02 -08:00
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
Alex
f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Alex
4a7dd400fe
Merge branch 'master' into on-update 2020-04-12 18:32:19 +02:00
Alex
b40cdcb5bd refactor: call parent update 2020-04-12 18:30:21 +02:00
Aleksei Bavshin
ae6ca36fa7
fix(sway): resolve destruction dependency between Ipc and SleeperThread
Ipc destructor closes socket and thus wakes up SleeperThread which was
waiting for socket data in Ipc::handleEvent.
Ipc::handleEvent then proceeds with sending signal to already destroyed
object, causing heap-use-after-free Address Sanitizer error.
2020-02-04 23:22:43 -08:00
xPMo
e38df047fd
sway/mode: enable pango markup on supported modes
IPC reports {"mode": "mode_string", "pango_markup": bool}.
Use this to conditionally enable pango markup.
2019-08-28 19:48:33 -05:00
Alex
a6980fca7f feat: ellipsize modules 2019-06-28 14:16:09 +02:00
Alex
ff9d598c16 fix: add proper mutex 2019-06-17 11:39:45 +02:00
Alex
d24d85bebf refactor: move label name and id to label contructor 2019-05-22 12:06:24 +02:00
Alex
12a251c3a4 fix(mode): escape text 2019-05-20 20:51:19 +02:00
Lucas Lazare
51be97f9aa Adding spdlog 2019-05-18 19:44:45 -04:00
Alex
5bf0ca85ac refactor: try/catch around json parse 2019-05-09 10:30:54 +02:00
Alex
5a44c8c6de refactor: avoid unneeded json parsing 2019-05-07 13:43:48 +02:00
Alex
b75e0bb0d0 refactor: remove useless bar param 2019-05-07 13:21:18 +02:00
Alex
311c34ecbc feat(Bar): handle widget size changes 2019-04-24 12:37:24 +02:00
Alex
cccf60c30e fix(Workspaces): fix concurrence and move json parser to ipc client 2019-04-23 11:42:08 +02:00
Alex
bb1cf7570e refactor(IPC): use sigc signal 2019-04-19 11:09:06 +02:00
Alex
6ed8f94dab refactor: format code 2019-04-18 17:52:00 +02:00
Alex
0271e9bc1a Revert "fix: Escape user controlled input"
This reverts commit 7247360e29.
2019-02-28 19:30:27 +01:00
Robinhuett
7247360e29 fix: Escape user controlled input 2019-02-25 18:28:56 +01:00
Alex
83a6475510 feat: can disable tooltip 2019-02-22 11:35:47 +01:00
Alexis
399f61df98 refactor: proper modules destruction 2019-01-13 22:22:22 +01:00
Alexis
b554094c7e feat: args && class id 2018-12-18 17:30:54 +01:00
Alexis
c7b0639f32 fix(workspaces): check thread is running 2018-12-09 10:49:28 +01:00
Alexis
691fb88057 refactor(modules): const bar 2018-12-01 00:10:41 +01:00
Alexis
bd62c4cbc5 feat(Label): use set_markup 2018-11-21 20:49:09 +01:00
Robinhuett
a042eea384 Add module to show sway binding mode 2018-10-30 13:39:30 +01:00