Commit graph

65 commits

Author SHA1 Message Date
Ludgie
b34d074063
feat: implement <font place="InactiveWindow"> (ref scope: 2.4.7) (#1292)
* feat: implement <font place="InactiveWindow"> (ref scope: 2.4.7)
* docs: add inactivewindow
2023-12-07 09:28:27 +01:00
Johan Malm
5bc58fc381 theme: fix icon bug
Do not carry over previous alt_filename for icons that don't have one.
2023-12-06 23:02: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
Dima Krasner
a9076f2a01 use the GTK+ 3 notebook header color as the default active title color 2023-11-28 21:55:33 +00:00
John Lindgren
a036d985d7 common: rename array-size.h to macros.h 2023-10-21 12:37:42 +01:00
Moises Lima
47a80fc4f2 Refactor title height to use 'titlebar.height' from themerc 2023-10-06 22:19:16 +01:00
Johan Malm
8d3b15576b Add ARRAY_SIZE() macro 2023-09-19 22:03:59 +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
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
Johan Malm
a6a03daae3 Support png buttons
In the theme directory add close-{active,inactive}.png instead of
close.xbm - and similarly for iconify, menu and max.
2023-08-09 07:38:17 +01:00
Johan Malm
eca98a9b6e theme: simplify loading of xbm buttons
No functional change.
2023-08-09 07:38:17 +01:00
Johan Malm
aef5b45b5f theme: limit corner radius to the height of the titlebar 2023-07-17 20:12:14 +01:00
Johan Malm
318d881650 theme: fix rounded-corner bug
Make top left/right corner pieces with large border thickness pixel
perfect.

Fixes: issue #988
2023-07-17 20:12:14 +01:00
Consolatis
235a8ad9bc ToggleKeybinds per window 2023-07-06 06:02:28 +01:00
Johan Malm
2c66fa279f osd: make item-border part of item-height 2023-07-05 21:31:30 +01:00
Consolatis
660127acb0 theme: add option osd.window-switcher.item.active.border.width
...and change default values for the variables below to keep the
window-switcher look the same as it was at the last release.

osd.window-switcher.padding = 4
osd.window-switcher.item.padding.y = 1
osd.window-switcher.item.active.border.width = 2
2023-07-05 21:31:30 +01:00
Johan Malm
55bf79c3fe theme: add option osd.window-switcher.padding
Fixes: issue #969
2023-07-05 21:31:30 +01:00
Johan Malm
df53c28a0f theme: add window-switcher width/padding
...and calculate item-height based on font-height

Add theme options
  - osd.window-switcher.width
  - osd.window-switcher.item.padding.x
  - osd.window-switcher.item.padding.y

Issue #879
2023-06-29 19:14:08 +01:00
Johan Malm
71f5ac8323 Add common/match.c with match_glob() from theme.c
...and make it fully case-insensitive in preparation for window-rules.
2023-05-04 22:09:55 +01:00
Consolatis
1995a33df9 CodeStyle: prevent space in code indents 2023-01-31 21:22:40 +00:00
Consolatis
9d7386effd include/ssd.h: prefix defines with SSD_ 2023-01-06 18:32:36 +01:00
Johan Malm
af56b68041 theme: support theme setting override
...by reading <config-dir>/themerc-override where <config-dir> is normally
$HOME/.config/labwc can be other locations as described in labwc-config(5)
and can also be specified by the command line option -C.

The reason for supporting theme override is to give users more fine-
grained control of settings without making local copies and modifying
themes.
2023-01-03 21:21:21 +00:00
Flrian
6d1d0aecab src/theme.c: add menu to individual buttons 2022-12-23 19:04:28 +01:00
Consolatis
d00327bc32 menu: Dynamically adjust menu width based on widest item
Adds two new theme vars:
- menu.width.min (menu will never be smaller than this)
- menu.width.max (menu will never be wider than this + padding)

A fixed menu width can be achieved by setting
menu.width.min == menu.width.max.
2022-12-06 21:08:43 +00:00
Consolatis
f0666ba5c9 menu: Convert hardcoded item padding to theme vars
Adds two new theme vars:
- menu.items.padding.x
- menu.items.padding.y
2022-12-06 21:08:43 +00:00
Consolatis
3da7cfd8c6 theme: Rename separator_width to separator_line_thickness 2022-12-06 21:08:43 +00:00
John Lindgren
cb40cdc36c common: Add additional memory utilities (xzalloc() etc.) 2022-09-17 10:57:30 -04:00
John Lindgren
07a83c19f0 config: Add support for font slant and weight 2022-09-15 21:48:05 +01:00
Consolatis
127a9c7be4 src/{common/font,theme}.c: Switch to cairo helpers 2022-08-26 06:54:12 +01:00
Johan Malm
437230b3a0 menu: support <separator />
Add theme options:
- menu.separator.width
- menu.separator.padding.width
- menu.separator.padding.height
- menu.separator.color

Support separator lines defined by <separator />

Note that separator labels (with text) defined by <separator label="" />
are not supported.
2022-06-25 14:56:35 +02:00
Consolatis
b7907cc2da theme: implement osd.border.color and osd.border.width
http://openbox.org/wiki/Help:Themes#osd.border.color
http://openbox.org/wiki/Help:Themes#osd.border.width
2022-06-01 17:55:36 +01:00
Consolatis
78dc2ea7fe src/theme.c: Clean up corner buffers on finish 2022-05-26 22:19:56 +01:00
Johan Malm
f925fe5893 theme: change window.label.text.justify default to center
It just looks better :)
2022-04-22 17:54:20 +01:00
Consolatis
e086f6f5e0 ssd: move top border above titlebar 2022-03-12 15:32:44 +00:00
Consolatis
e4f1f9a975 ssd: use dynamic titlebar height based on font size and padding 2022-03-12 15:32:44 +00:00
Consolatis
5862b65f89 Convert SSD to scene nodes 2022-02-23 21:47:01 +00:00
Consolatis
044388a5cd Prepare to move from wlr_texture to lab_data_buffer 2022-02-23 21:47:01 +00:00
Consolatis
b7b1e8064f Add WindowMenu button 2022-01-26 06:17:41 +00:00
Johan Malm
dd1663e627 theme: add menu.overlap.{x,y} 2021-11-08 17:36:39 +00:00
Joshua Ashton
8b8e37c268 theme: Implement window.label.text.justify
Crosses off 6.12.1

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-17 20:50:13 +01:00
Joshie
6bcefc27a8 theme: fix parsing inactive label colors
There was a typo here which meant these never got parsed and always appeared as black.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-17 11:59:02 +01:00
Johan Malm
54d22a7129 theme: inherit osd colors if not set 2021-10-15 21:44:27 +01:00
Johan Malm
597650b457 theme: add window_(in)active_label_text_color
Support both active and inactive colors for titlebar text
2021-10-15 21:35:41 +01:00
Johan Malm
960a1bb2ed theme: add osd colors 2021-10-13 21:29:32 +01:00
Johan Malm
ebb632419b *.c: add SPDX-License-Identifier 2021-09-24 21:45:48 +01:00
Johan Malm
4738e26d15 theme: handle border.color for backward compatibility 2021-09-24 21:26:31 +01:00
Johan Malm
2143f4bf19 theme: handle keys case-insensitively
...because this is what openbox does and some themes have capital
letters in places
2021-09-24 21:19:19 +01:00
Johan Malm
cce3c8cda0 src/: fix coding style 2021-09-21 22:05:56 +01:00