Reword code comments in plain technical language

Comments only, no code changes. Replaces vague or personified phrasing
with explicit statements of what the code does and why, uses bullet
lists for multi-case behavior, and fixes the settings path in
WindowSettings.h (~/.config/sloposk/sloposk.conf).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-03 19:58:59 +01:00
co-authored by Claude Opus 5.5
parent 5e4d4051f3
commit 23e957660f
53 changed files with 232 additions and 226 deletions
+9 -9
View File
@@ -12,36 +12,36 @@ Window {
property var collapse: null // CollapseController, set from C++
readonly property bool collapsed: collapse?.collapsed ?? false
property bool settingsOpen: false
// Height of the key area, for C++ keeping key sizes when rows change.
// Read by C++ to keep key size constant when rows are added or removed.
readonly property real keysHeight: keyboard.height
// Transparent room above the keyboard for long-press popups on the top row.
// Transparent space above the keyboard for the top row's long-press popups.
readonly property real popupMargin: 90
// Outside this, input passes through to whatever is below the window.
// Input outside this rect goes to the window underneath.
readonly property rect inputRegion: collapsed
? Qt.rect(floatingButton.x, floatingButton.y, floatingButton.width, floatingButton.height)
: 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.
// Empty (no blur) when collapsed, blur is off, or the background is opaque.
readonly property rect blurRegion: !collapsed && 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
// None while shrunk to the floating button.
// No minimum while collapsed, so the window can shrink to the button.
minimumWidth: collapsed ? 0 : 480
minimumHeight: collapsed ? 0 : 180 + popupMargin
visible: false
color: "transparent"
// Alt+F4 or the task manager would hide it behind the visibility
// controller's back; the dismiss key and the tray toggle hide it instead.
// Ignore close requests (Alt+F4, task manager): they would hide the window
// without VisibilityController knowing. Hiding goes through the dismiss key or tray toggle.
onClosing: close => close.accepted = false
onInputRegionChanged: placement?.setInputRegion(inputRegion)
onBlurRegionChanged: placement?.setBlurRegion(blurRegion, Theme.windowRadius)
// For CollapseController.
// Called by CollapseController.
function dismissKeyRect() {
return keyboard.keyRect("dismiss");
}
@@ -107,7 +107,7 @@ Window {
FloatingButton {
id: floatingButton
readonly property rect keyRect: root.collapse?.keyRect ?? Qt.rect(0, 0, 0, 0)
// Over the key while the window is full size, then in the shrunk window.
// keyRect is in full-window coordinates; the clamp keeps the button inside the window once it has shrunk.
x: Math.max(0, Math.min(keyRect.x, root.width - width))
y: Math.max(0, Math.min(keyRect.y, root.height - height))
width: keyRect.width