Commit graph

28 commits

Author SHA1 Message Date
David Turner
ce0d2c2966
ssd: add window drop-shadows (#1648)
Add optional drop-shadows to windows using server-side decoration.
Shadows can be enabled/disabled rc.xml and their appearance configured
in themerc.  The default is no shadows to preserve current behaviour.

The shadows are drawn in fixed corner and edge buffers shared between
all windows, the edges are scaled to size depending on the size of each
window.  Two sets of buffers are used to give the different appearances
for active and inactive windows.  I use separate corner/edge buffers for
a few reasons:

- It avoids needing to store a separate large shadow buffer per window
- It avoids needing to redraw the shadows when the window is being
  resized
- Compositing the shadows onto the desktop should be faster as there are
  overall fewer pixels to blend, and scaling up the edge buffers only
  requires reading a tiny buffer which is then replicated.
2024-04-22 19:27:53 +01:00
tokyo4j
b0ba585ff8 overlay: allow to draw both/either of filled/outlined rectangle
Filled/outlined rectangles shown as snapping overlay are now enabled/disabled
independently with `snapping.overlay.[region|edge].bg.enabled` and
`snapping.overlay.[region|edge].border.enabled`.

To keep the default behavior, `*.bg.enabled` is yes and `*.border.enabled` is
no for hardware-based renderers, while `*.bg.enabled` is no and
`*.border.enabled` is yes for software-based (pixman) renderer.

Users can now use a filled rectangle as an overlay even with pixman renderer.
However, this may severely impact performance when used with translucent
`snapping.overlay.[region|edge].bg.color`.

This commit includes a refactor to use substruct `theme_snapping_overlay`
inside `theme` in order to pass it to `create_overlay_rect()` in a cleaner way.

Breaking changes is:
- `snapping.overlay.[region|edge].fill` is now removed.
2024-04-22 19:22:23 +01:00
tokyo4j
34290ef629 overlay: s/preview/overlay/
Replace "preview" in rc.xml and themerc with "overlay" since "preview" sounds
like it shows the window content.

Breaking changes are:
- `snapping.preview.*` in themerc is now replaced with `snapping.overlay`.
- `<snapping><preview>` in rc.xml is now replaced with `<snapping><overlay>`.
2024-04-22 19:22:23 +01:00
tokyo4j
8096df19ba osd: add theme settings for window-switcher preview
Adds theme settings like:
osd.window-switcher.preview.border.width: 2
osd.window-switcher.preview.border.color: #ffffff,#00a2ff,#ffffff
2024-04-16 09:58:34 +02:00
tokyo4j
3b13f4cdcd overlay: add theme settings for colors and border width
adds theme settings like:
snapping.overlay.[region|edge].bg.color: #8080b380
snapping.overlay.[region|edge].border.color: #ffffff,#000000,#ffffff
snapping.overlay.[region|edge].border.width: 1
2024-04-15 12:33:40 +02:00
tokyo4j
50fd65416f overlay: add theme setting snapping.preview.[region|edge].fill
This settings allows user to choose whether to draw a filled rectangle
or an outlined rectangle as the preview for window snapping.
2024-04-15 12:33:40 +02:00
tokyo4j
3c4c0a6643 themerc: fix default value of osd.bg.color 2024-04-14 14:44:43 +01:00
Droc
eb5e855b69 osd: support percent values for window switcher width
Add ability to set width with percentage of monitor instead of just pixels.
With this the OSD sizes itself properly on both my 4k and 2k monitors.

example: 50% or 75% instead of 600, max 100%
2024-04-08 15:44:53 +02:00
kyak
268191fce8
Add theme option to configure boxes from workspace OSD
This allows to configure width and height of "boxes" displayed in the
workspace OSD. A setting of `0` disables the boxes.
2023-12-11 10:41:33 +01: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
Moises Lima
47a80fc4f2 Refactor title height to use 'titlebar.height' from themerc 2023-10-06 22:19:16 +01:00
Consolatis
235a8ad9bc ToggleKeybinds per window 2023-07-06 06:02:28 +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
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
Johan Malm
45ce978b5a docs/themerc: add menu.width.{min,max} + menu.items.padding.{x,y}
...to reflect additions introduced by f0666ba and d00327b

Move menu.overlap.* to the menu section for a more logical grouping
2023-01-01 18:59:16 +00:00
Flrian
63632cfd1a docs: update theme documentation
.. to reflect that its now possible to change the color of the menu button
2022-12-23 19:04:28 +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
Johan Malm
f925fe5893 theme: change window.label.text.justify default to center
It just looks better :)
2022-04-22 17:54:20 +01:00
Johan Malm
dd1663e627 theme: add menu.overlap.{x,y} 2021-11-08 17:36:39 +00:00
Johan Malm
a542f0e93b docs/themerc: add missing theme options 2021-10-20 19:52:17 +01:00
Johan Malm
289c784d5e theme: document setting iconify/close/max colors separately 2021-08-22 19:11:54 +01:00
Johan Malm
85c775c3b1 theme: update built-in theme colors
Use #dddad6 for active title/border and #f6f5f4 for inactive.
It matches default GTK colors reasonably well.
2021-04-10 19:30:39 +01:00
Johan Malm
db4249dcc4 themerc: fix syntax inconsistency 2021-03-04 20:30:23 +00:00
Johan Malm
bc04f50d14 Add basic menu theme options 2021-02-16 20:43:20 +00:00
Johan Malm
56ce0893e0 Move data/* to docs/ 2020-09-28 21:09:19 +01:00
Renamed from data/themes/labwc-default/openbox-3/themerc (Browse further)