osd: support window switcher with thumbnails

The new-style window switcher can be enabled with
<windowSwitcher style="thumbnail">.

New theme entries:

osd.window-switcher.style-thumbnail.width.max: 80%
osd.window-switcher.style-thumbnail.padding: 4
osd.window-switcher.style-thumbnail.item.width: 300
osd.window-switcher.style-thumbnail.item.height: 250
osd.window-switcher.style-thumbnail.item.padding: 10
osd.window-switcher.style-thumbnail.item.active.border.width: 2
osd.window-switcher.style-thumbnail.item.active.border.color: #589bda
osd.window-switcher.style-thumbnail.item.active.bg.color: #c7e2fc
osd.window-switcher.style-thumbnail.item.icon.size: 60
This commit is contained in:
tokyo4j 2025-08-08 14:53:34 +09:00 committed by Johan Malm
parent 6e2805f692
commit 2e9292b7a3
13 changed files with 434 additions and 5 deletions

View file

@ -278,7 +278,7 @@ this is for compatibility with Openbox.
## WINDOW SWITCHER
```
<windowSwitcher show="yes" preview="yes" outlines="yes" allWorkspaces="no">
<windowSwitcher show="yes" style="classic" preview="yes" outlines="yes" allWorkspaces="no">
<fields>
<field content="icon" width="5%" />
<field content="desktop_entry_name" width="30%" />
@ -287,10 +287,14 @@ this is for compatibility with Openbox.
</windowSwitcher>
```
*<windowSwitcher show="" preview="" outlines="" allWorkspaces="">*
*<windowSwitcher show="" style="" preview="" outlines="" allWorkspaces="">*
*show* [yes|no] Draw the OnScreenDisplay when switching between
windows. Default is yes.
*style* [classic|thumbnail] Configures the style of the OnScreenDisplay.
"classic" displays window information like icons and titles in a vertical list.
"thumbnail" shows window thumbnail, icon and title in grids.
*preview* [yes|no] Preview the contents of the selected window when
switching between windows. Default is yes.
@ -302,7 +306,7 @@ this is for compatibility with Openbox.
are shown).
*<windowSwitcher><fields><field content="" width="%">*
Define window switcher fields.
Define window switcher fields when using *<windowSwitcher style="classic" />*.
*content* defines what the field shows and can be any of: