Skip to content

Commit 40dd7a0

Browse files
committed
docs(decorated-window): document reactive GNOME titlebar button layout support
- Add details on observing `button-layout` changes via GSettings to runtime and changelog documentation. - Explain reactive updates, supported configurations, and fallback behavior for KDE and other environments. - Include Kotlin usage example for `rememberLinuxButtonLayout()`.
1 parent 3a0169f commit 40dd7a0

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

docs/changelog.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## v1.11.0
4+
5+
**Released: 2026-04-13**
6+
7+
### New Features
8+
9+
- **GNOME titlebar button layout support** — Decorated windows on Linux now read the system `button-layout` GSettings key to determine which buttons to show (close, minimize, maximize) and on which side (left or right). The layout updates reactively when the user changes it in GNOME Tweaks or via `gsettings set`. Falls back to the default layout on KDE and other desktop environments.
10+
11+
### Documentation
12+
13+
- **GraalVM status updated to alpha** — GraalVM Native Image support is now labeled "alpha" instead of "experimental", reflecting the improved out-of-the-box experience with centralized reachability metadata
14+
15+
---
16+
317
## v1.10.0
418

519
**Released: 2026-04-12**

docs/runtime/decorated-window.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ The following tables compare a standard Compose `Window()`, the JBR module (`dec
194194
| Custom title bar content | No | Yes (fully undecorated) | Yes (fully undecorated) |
195195
| Window controls | WM-provided | Compose `WindowControlArea` (SVG) | Compose `WindowControlArea` (SVG) |
196196
| Desktop environment styling | WM-provided | GNOME Adwaita / KDE Breeze icons | GNOME Adwaita / KDE Breeze icons |
197+
| System button layout | WM-provided | Reactive (GSettings observer) | Reactive (GSettings observer) |
197198
| Window shape | WM-provided | Rounded corners (GNOME 12dp, KDE 5dp top only) | Rounded corners (GNOME 12dp, KDE 5dp top only) |
198199
| Title bar drag | WM-provided | `JBR.getWindowMove()` | `_NET_WM_MOVERESIZE` via JNI or Compose fallback |
199200
| Double-click maximize | WM-provided | Compose detection | Compose detection |
@@ -687,3 +688,26 @@ On Linux, the module detects the current desktop environment and loads the appro
687688
- **Other** — Falls back to GNOME style
688689

689690
Detection uses `XDG_CURRENT_DESKTOP` and `DESKTOP_SESSION` environment variables.
691+
692+
### System Button Layout
693+
694+
On GNOME, the module reads the `org.gnome.desktop.wm.preferences``button-layout` GSettings key to determine which titlebar buttons to display and on which side. This is done via `libgio` (`dlopen`, no hard compile-time dependency).
695+
696+
The layout updates **reactively** — if the user changes the button configuration in GNOME Tweaks (or via `gsettings set`), the title bar updates in real time without restarting the application.
697+
698+
Supported configurations include:
699+
700+
- `:minimize,maximize,close` — right side, all buttons (GNOME with tweaks)
701+
- `close,minimize,maximize:` — left side, Ubuntu style
702+
- `appmenu:close` — right side, close only (GNOME default)
703+
704+
On **KDE** and other desktop environments, the module falls back to the default layout (close, maximize, minimize on the right).
705+
706+
If you need the layout value directly (e.g. for custom rendering), use the `rememberLinuxButtonLayout()` composable:
707+
708+
```kotlin
709+
val layout = rememberLinuxButtonLayout()
710+
// layout.buttons — ordered list of visible buttons
711+
// layout.controlsOnRight — true if buttons are on the right side
712+
// layout.hasClose / layout.hasMinimize / layout.hasMaximize
713+
```

0 commit comments

Comments
 (0)