Skip to content

Fix macOS titlebar preference - #1608

Open
KorigamiK wants to merge 3 commits into
ahrm:developmentfrom
KorigamiK:fix-macos-titlebar-pref
Open

Fix macOS titlebar preference#1608
KorigamiK wants to merge 3 commits into
ahrm:developmentfrom
KorigamiK:fix-macos-titlebar-pref

Conversation

@KorigamiK

Copy link
Copy Markdown
Contributor

The current implementation makes the macos_hide_titlebar preference option hide the traffic lights and make the title bar transparent. This pr makes the preference work permanently using the same functionality as toggle_titlebar option.

Copilot AI review requested due to automatic review settings May 3, 2026 21:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adjusts macOS titlebar handling so the macos_hide_titlebar preference uses the same Qt window-flag mechanism as the existing toggle_titlebar behavior, instead of a custom native Cocoa implementation.

Changes:

  • Introduces set_titlebar_visible() helper to centralize titlebar flag toggling.
  • Replaces hideWindowTitleBar(...) usage with set_titlebar_visible(...) for main and helper windows (including runtime config reload).
  • Removes the native hideWindowTitleBar Cocoa implementation from macos_specific.mm.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pdf_viewer/main_widget.cpp Adds a shared helper for toggling titlebar visibility and applies it for the macOS preference + existing toggle.
pdf_viewer/macos_specific.mm Deletes the now-unused native titlebar-hiding implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pdf_viewer/main_widget.cpp
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.

2 participants