aboutsummaryrefslogtreecommitdiff
path: root/swaynag/render.c
AgeCommit message (Collapse)AuthorLines
2022-07-01Reuse parsed PangoFontDescriptionFurkan Sahin-9/+9
Avoids parsing the configured font each time text is rendered.
2021-09-13Rename pango_printf to render_textFurkan Sahin-3/+3
This avoids using the pango_ prefix, reserved for functions coming from the Pango library.
2021-09-09Simplify swaybar/swaynag scaling codeFurkan Sahin-29/+29
Use `cairo_scale` to set the scale factor, removing redundant multiplications by `output->scale`.
2021-05-07cairo: Replace <cairo/cairo.h> by <cairo.h>Furkan Sahin-1/+1
For full context, read https://gitlab.freedesktop.org/cairo/cairo/-/issues/479 TL;DR, cairo’s pc file adds `/cairo` to CFLAGS. So namespace cairo shouldn’t be used.
2020-09-08swaynag: add details background optionFurkan Sahin-2/+2
Adds a new config option for details background for swaynag issue/#5673
2020-09-02swaynag: adds option to separately specify the text color for buttonsFurkan Sahin-2/+2
2019-01-22Fix dead stores found by scan-buildFurkan Sahin-7/+0
In addition to removing unused code, two minor problems are fixed: (1) `resize set` and `resize adjust` did not error when given too many arguments. (2) `orientation` was incorrectly overridden to be 'U' for scroll events in the swaybar tray `handle_click` function.
2019-01-22swaynag: Small graphical fix, add offset of +1 to X/Y.Furkan Sahin-2/+2
2019-01-20Replace wlr_log with sway_logFurkan Sahin-1/+1
This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag.
2018-09-08Align titles to baselineFurkan Sahin-5/+5
This does the following: * Adds a baseline argument to get_text_size (the baseline is the distance from the top of the texture to the baseline). * Stores the baseline in the container when calculating the title height. * Takes the baseline into account when calculating the config's max font height. * When rendering, pads the textures according to the baseline so they line up.
2018-07-30swaynag: fix hidpiFurkan Sahin-10/+14
2018-07-29swaynag: allow more config optionsFurkan Sahin-25/+26
2018-07-28swaynag: refactor {sway_,}nagbar to swaynagFurkan Sahin-127/+129
2018-07-28Disable pango markup for extended messageFurkan Sahin-2/+2
2018-07-28swaynag: implement config file supportFurkan Sahin-11/+12
2018-07-27Address first round review for swaynagFurkan Sahin-0/+300