Johan Malm
d0aff49c81
button: save a few cycles by returning early
...
...and in preparation for the merge-config patch, avoid building
directory lists for empty filenames.
2024-01-18 20:20:36 +00:00
Johan Malm
235e11f6c9
xbm: s/u32/argb32/ function name change
2023-12-29 11:46:16 +01:00
kyak
266690091f
Remove headers not being used directly
...
Fix clangd warnings regarding headers not being used directly.
2023-12-22 20:19:39 +00:00
Johan Malm
b7ee8b16f3
theme: move more button fallback logic to theme.c
...
...and simplify button_xbm_load() by splitting it into one function that
loads an xbm file and another that creates an icon from a builtin
bitmap.
2023-12-21 02:42:23 +01:00
John Lindgren
d207e97992
theme: use non-hover button variants as fallback
...
Some themes don't have hover variants for button pixmaps.
It looks better visually to use the non-hover variants as fallbacks
rather than the built-in 6x6 pixmaps.
2023-12-21 02:42:23 +01:00
Simon Long
c79b8ba8a7
Support hover icons in titlebar ( #1280 )
...
Allow both max_toggled_hover and max_hover_toggled names for icons
2023-12-06 20:33:26 +00:00
Johan Malm
715405fe29
build: make svg buttons optional
...
Add -Dsvg=disabled to your meson setup/configure command to disable svg
buttons even if the correct version of librsvg is available.
Note that regardless of this patch and the value of the 'svg' variable,
the build will gracefully fall back to not using librsvg if the correct
version is not available.
Helped-by: @01micko
2023-09-17 19:26:41 +01:00
Johan Malm
c598cf7f11
button-png.c: s/png_load/button_png_load/
2023-09-17 19:26:41 +01:00
Johan Malm
c62df26c2a
Support svg buttons
...
In the theme directory add close-{active,inactive}.svg instead of
close.xbm - and similarly for iconify, menu and max.
2023-09-17 19:26:41 +01:00
Johan Malm
a386133068
common/file-helpers.c: share file_exists() to reduce duplication
2023-09-17 19:26:41 +01:00
Johan Malm
a8951c4b75
button/common.c: share button_filename() to reduce duplication
2023-09-17 19:26:41 +01:00
Johan Malm
2b9a6914a6
button: move button-png.c to button/
...
...so that all button code is in the same place.
2023-08-10 16:33:03 +01:00
Johan Malm
03bc2ada47
button: refactor xbm code
...
- Rename src/xbm/ to src/button/
- Combine xbm.c parse.c tokenize.c into button-xbm.c
No functional change
2023-08-10 16:33:03 +01:00