Skip to content

feat(lock): add vertical clock style - #3220

Merged
bbedward merged 2 commits into
duxlabs-dev:masterfrom
hthienloc:feat/lockscreen-vertical-clock
Aug 29, 2026
Merged

bbedward merged 2 commits into
duxlabs-dev:masterfrom
hthienloc:feat/lockscreen-vertical-clock

Conversation

@hthienloc

Copy link
Copy Markdown
Member

Adds a vertical clock layout option to the DMS lock screen. Users can switch between horizontal and vertical layouts from Settings > Lock Screen; the style selector is hidden when system time display is disabled.

The vertical layout keeps the existing time-format state, displays hour and minute digits in stacked rows, and preserves seconds/AM-PM information below when enabled.

Closes #2200

@hthienloc

Copy link
Copy Markdown
Member Author

/claude review

spacing: 0

ClockDigitText {
width: 75

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blank leading hour slot keeps its 75px width, so single-digit hours end up off-centre.

getEffectiveTimeFormat() returns "h:mm AP" by default (12h clock, padHours12Hour defaults to false), so hours is a single character for 1–9. This slot then renders empty text but still reserves 75px, making the Row 150 wide with the hour digit in the right half — it sits above the minutes digit instead of centred over the pair.

The horizontal row above handles this by collapsing the slot (width: clockText.hours.length > 1 ? 75 : 0); same fix applies here.

Suggested change
width: 75
width: clockText.hours.length > 1 ? 75 : 0

@claude

claude Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Claude review

Solid, self-contained addition — one layout defect with the default 12-hour clock.

  • Blank leading hour slot keeps its 75px width, pushing single-digit hours off-centre, quickshell/Modules/Lock/LockScreenContent.qml:462

Checked: setting wiring (SettingsData/SettingsSpec/search index regenerates consistently, tabIndex 11 + alphabetical placement correct), SettingsButtonGroupRow usage matches existing tabs, no en.json/template.json edits, term freeze is lifted so the new Horizontal/Vertical terms are fine and Clock Style reuses an existing term, no binding loops or undefined refs in the new Column (resolvedFontFamily is a StyledText property), horizontal path unchanged. Model: claude-opus-5.

@hthienloc

Copy link
Copy Markdown
Member Author

/claude review

@claude

claude Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.

Checked: the previous finding (blank 75px leading hour slot pushing single-digit hours off-centre) is fixed in f1d846e2 — the vertical hours Row now collapses the slot exactly like the horizontal one, so 12h non-padded time centres the lone digit over the minute pair. Setting wiring is complete and consistent (SettingsData / SettingsSpec / LockScreenTab, no other registry references settings keys). settings_search_index.json matches what extract_settings_index.py generates: keyword set derives exactly from tags + label + Lock Screen category + the clock -> time/watch abbreviation, sort key (tabIndex, label, section) puts it between Behavior and Display Assignment, and visible: SettingsData.lockScreenShowTime maps to no conditionKey. SettingsButtonGroupRow usage (model/currentIndex/onSelectionChanged, conditional visible with no height override) matches DockTab/TypographyMotionTab/DankIslandTab; DankButtonGroup never assigns currentIndex, so the binding survives clicks. term_freeze.json is absent so the freeze is lifted — new Horizontal/Vertical terms are fine, Clock Style reuses an existing term and the 2-arg I18n.tr context is comment-only so lookup still hits it; en.json/template.json untouched. In the new Column: resolvedFontFamily is a StyledText readonly property, horizontalCenter anchors inside a Column are legal (only vertical anchors warn), spacing: -8 mirrors DankDash/Overview/ClockCard.qml, the two clock variants are mutually exclusive so clockContainer.height is always defined, and the Lock module sets no LayoutMirroring so digit order is safe. Model: claude-opus-5.

@bbedward
bbedward merged commit 754040c into duxlabs-dev:master Aug 29, 2026
1 check passed
@hthienloc
hthienloc deleted the feat/lockscreen-vertical-clock branch November 15, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vertical clock on lock screen

2 participants