Skip to content

fix(ui): preserve Inter font on theme/settings updates and dock layout on fullscreen exit - #72

Merged
karakayahuseyin merged 1 commit into
mainfrom
fix/theme-font-and-fullscreen-layout
Nov 28, 2026
Merged

karakayahuseyin merged 1 commit into
mainfrom
fix/theme-font-and-fullscreen-layout

Conversation

@karakayahuseyin

Copy link
Copy Markdown
Contributor

Summary

  • Fix font reverting to system default (Ubuntu Sans 11) on theme switches and Settings updates:
    • Replace the global app.setStyleSheet("QTableView { ... }") in apply_theme() with a native class palette app.setPalette(table_palette, "QTableView"), keeping app.styleSheet() empty so Qt does not wrap QFusionStyle in QStyleSheetStyle (which caused Qt 6.11 repolish to stamp system fonts onto QMenuBar, QTreeWidget, QTableWidget, and QLabel).
    • Guard ActionManager.open_settings() so switch_theme() only runs when theme_mode actually changed.
  • Fix dock layout corruption after maximize/fullscreen roundtrip:
    • Stop snapshotting the uninitialized pre-layout dock state inside MainWindow.showEvent().
    • Sync normal-state geometry and dock layout snapshots after restore_dock_layout(), reset_layout(), and debounced dock layout edits (dockLocationChanged, topLevelChanged, visibilityChanged, dock resize/move), and guard _restore_normal_state() with restoring_layout = True.
  • Add regression tests in tests/core/test_theme.py and tests/core/test_workbench.py.

Verification

  • uv run ruff check . — passed
  • uv run ruff format --check . — passed (317 files already formatted)
  • uv run pyright — 0 errors, 0 warnings
  • QT_QPA_PLATFORM=offscreen uv run pytest — 669 passed, 272 subtests passed
  • Live Wayland checks verified Inter 10 across all 5 themes + Settings + QTableWidget #3a3a3a selection highlight, and pixel-exact dock restoration across maximize and fullscreen roundtrips.

@karakayahuseyin
karakayahuseyin merged commit f6286fa into main Nov 28, 2026
4 checks passed
@karakayahuseyin
karakayahuseyin deleted the fix/theme-font-and-fullscreen-layout branch November 28, 2026 20:11
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