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:
+27
-5
@@ -1,21 +1,25 @@
|
||||
import QtQuick
|
||||
import Sloposk
|
||||
|
||||
// Replaces the keys while open. Binds straight to Settings, which persists.
|
||||
Rectangle {
|
||||
// Replaces the keys while open, over the window's own background so
|
||||
// opacity changes show live. Binds straight to Settings, which persists.
|
||||
Flickable {
|
||||
id: panel
|
||||
|
||||
required property Settings settings
|
||||
required property LayoutModel layoutModel
|
||||
|
||||
color: Theme.background
|
||||
radius: Theme.windowRadius
|
||||
clip: true
|
||||
contentHeight: columns.height + 2 * columns.y
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
|
||||
Row {
|
||||
id: columns
|
||||
readonly property real columnWidth: (width - spacing) / 2
|
||||
|
||||
anchors { fill: parent; margins: 16 }
|
||||
x: 16
|
||||
y: 16
|
||||
width: panel.width - 2 * x
|
||||
spacing: 32
|
||||
|
||||
Column {
|
||||
@@ -55,6 +59,24 @@ Rectangle {
|
||||
checked: panel.settings.doubleSpacePeriod
|
||||
onToggled: checked => panel.settings.doubleSpacePeriod = checked
|
||||
}
|
||||
|
||||
SectionHeader { text: qsTr("Appearance"); topPadding: 12 }
|
||||
|
||||
SliderRow {
|
||||
width: parent.width
|
||||
text: qsTr("Background")
|
||||
from: 0.1 // Settings::MinBackgroundOpacity
|
||||
value: panel.settings.backgroundOpacity
|
||||
onMoved: value => panel.settings.backgroundOpacity = value
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
width: parent.width
|
||||
text: qsTr("Blur Behind")
|
||||
detail: qsTr("Frosted glass under a see-through background, if the desktop supports it")
|
||||
checked: panel.settings.blurBackground
|
||||
onToggled: checked => panel.settings.blurBackground = checked
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
|
||||
Reference in New Issue
Block a user