See-through keyboard background with optional blur
- Opacity slider for the panel behind the keys (10–100%); keys stay opaque - Blur Behind: asks the compositor (KWin) to blur under the rounded panel via KF6 WindowSystem; skipped at full opacity - Settings panel draws over the window background so changes show live, and scrolls when it doesn't fit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-2
@@ -18,6 +18,10 @@ Window {
|
||||
readonly property rect inputRegion: keyboard.alternates.open
|
||||
? Qt.rect(0, 0, width, height)
|
||||
: Qt.rect(panel.x, panel.y, panel.width, panel.height)
|
||||
// Empty when nothing shows through, so the compositor skips the blur.
|
||||
readonly property rect blurRegion: settings.blurBackground && settings.backgroundOpacity < 1
|
||||
? Qt.rect(panel.x, panel.y, panel.width, panel.height)
|
||||
: Qt.rect(0, 0, 0, 0)
|
||||
|
||||
width: 1000
|
||||
height: 340 + popupMargin
|
||||
@@ -27,13 +31,17 @@ Window {
|
||||
color: "transparent"
|
||||
|
||||
onInputRegionChanged: placement?.setInputRegion(inputRegion)
|
||||
onPlacementChanged: placement?.setInputRegion(inputRegion)
|
||||
onBlurRegionChanged: placement?.setBlurRegion(blurRegion, Theme.windowRadius)
|
||||
onPlacementChanged: {
|
||||
placement?.setInputRegion(inputRegion);
|
||||
placement?.setBlurRegion(blurRegion, Theme.windowRadius);
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: panel
|
||||
anchors { fill: parent; topMargin: root.popupMargin }
|
||||
radius: Theme.windowRadius
|
||||
color: Theme.background
|
||||
color: Qt.rgba(Theme.background.r, Theme.background.g, Theme.background.b, root.settings.backgroundOpacity)
|
||||
|
||||
Keyboard {
|
||||
id: keyboard
|
||||
|
||||
Reference in New Issue
Block a user