Skip to content

Redesign login form (eos-breeze style) and eliminate preview/theme duplication#6

Merged
derryl merged 4 commits intomainfrom
theme-tweaks
Feb 27, 2026
Merged

Redesign login form (eos-breeze style) and eliminate preview/theme duplication#6
derryl merged 4 commits intomainfrom
theme-tweaks

Conversation

@derryl
Copy link
Owner

@derryl derryl commented Feb 27, 2026

Summary

  • Login form redesign: Remove username field (uses userModel.lastUser directly), add password + small icon login button in a horizontal row, restyle password field with dark slate inset background, move power buttons directly below the login form
  • Preview architecture overhaul: Inject mock SDDM context properties from Python (preview-host.py) via setContextProperty() — the same mechanism real SDDM uses — so the Loader loads the theme's Main.qml directly. Eliminates ThemeLayout.qml and the duplicated layout logic that had to be kept in sync. Any theme in themes/ now works with the preview out of the box.
  • CLAUDE.md rewrite: Comprehensive architecture docs, QML/PyQt6 guidelines, gotchas encountered during development, and Context7 documentation references

Test plan

  • Run ./scripts/lint-qml.sh — passes static analysis and runtime type-error check
  • Run ./scripts/preview.sh — preview window shows background, clock, password field with inline login button, power buttons centered below, session selector in footer
  • Enter password test in preview — mock login succeeds
  • Enter wrong password — "Login Failed" message appears and clears after 3s
  • Edit a theme QML file while preview is running — hot-reload picks up changes
  • Verify no files outside themes/default/ contain theme-specific layout logic

🤖 Generated with Claude Code

derryl and others added 4 commits February 26, 2026 17:26
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
LoginForm: remove username field (uses defaultUsername directly), add
password + small icon login button in a horizontal row, restyle password
field with dark slate inset background.

Main.qml: move PowerBar from footer to directly below login form,
centered horizontally.

Preview architecture: inject mock SDDM context properties (sddm, config,
userModel, sessionModel, keyboard) from Python via setContextProperty(),
matching how the real SDDM greeter works. This lets the Loader load the
theme's Main.qml directly — eliminating ThemeLayout.qml and the
duplicated layout logic that had to be kept in sync.

- preview-host.py: add MockSddm, MockConfig (reads theme.conf),
  MockUserModel, MockSessionModel, MockKeyboard classes
- Preview.qml: reduced to thin window shell + Loader + overlay
- preview.sh: also symlinks Main.qml, passes theme dir to Python host
- lint-qml.sh: use Python host for runtime type-error check
- Delete preview/ThemeLayout.qml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Comprehensive rewrite covering:
- Updated preview architecture (Python context properties, no ThemeLayout)
- Full SDDM context property reference table
- Key file descriptions for all theme and preview files
- QML guidelines: graphical effects, inset borders, Component.onCompleted
  pitfall, color functions, focus management, common patterns
- PyQt6 guidelines: GC/object lifetime, configparser casing, file URL
  paths, writable properties, QAbstractListModel roles
- Context7 documentation references for Qt 6

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@derryl derryl merged commit 9c54180 into main Feb 27, 2026
2 checks passed
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.

1 participant