Fix double-space period, shift double-tap; settings; letters from system keymap
- Double-space replaced the space via a Backspace keysym, which clients apply after the commit: use delete_surrounding_text with the commit - Tests use a shared FakeEngine that applies ops to a simulated field - Double-tap shift locks at a sentence start; typing between taps doesn't - Organization name set: config lives in ~/.config/sloposk/ - Settings (auto-capitalization, double-space period) with a ⚙ panel - Letter rows come from the compositor's XKB keymap; other letters of the layout become long-press alternates; globe switches the system layout over org.kde.keyboard - One JSON template for non-letter layers; stretch keys even out rows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
import QtQuick
|
||||
|
||||
// A labelled on/off switch in the iOS style.
|
||||
Item {
|
||||
id: row
|
||||
|
||||
required property string text
|
||||
property string detail: ""
|
||||
property bool checked: false
|
||||
signal toggled(bool checked)
|
||||
|
||||
implicitHeight: 52
|
||||
|
||||
Column {
|
||||
anchors { left: parent.left; right: track.left; rightMargin: 12; verticalCenter: parent.verticalCenter }
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
width: parent.width
|
||||
text: row.text
|
||||
color: Theme.text
|
||||
font.pixelSize: 16
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
Text {
|
||||
width: parent.width
|
||||
visible: text !== ""
|
||||
text: row.detail
|
||||
color: Theme.secondaryText
|
||||
font.pixelSize: 12
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: track
|
||||
anchors { right: parent.right; verticalCenter: parent.verticalCenter }
|
||||
width: 50
|
||||
height: 30
|
||||
radius: height / 2
|
||||
color: row.checked ? Theme.toggleOn : Theme.functionKey
|
||||
|
||||
Rectangle {
|
||||
x: row.checked ? parent.width - width - 2 : 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: parent.height - 4
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: "#ffffff"
|
||||
Behavior on x { NumberAnimation { duration: 120 } }
|
||||
}
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
onTapped: row.toggled(!row.checked)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user