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.
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.
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>`.
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%
...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
...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.
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.