Skip to content

feat: use native macOS window frame on Apple Silicon#907

Open
ZiWei09 wants to merge 1 commit into
DreamSourceLab:masterfrom
ZiWei09:feat/macos-native-window
Open

feat: use native macOS window frame on Apple Silicon#907
ZiWei09 wants to merge 1 commit into
DreamSourceLab:masterfrom
ZiWei09:feat/macos-native-window

Conversation

@ZiWei09
Copy link
Copy Markdown

@ZiWei09 ZiWei09 commented May 15, 2026

Summary

This PR replaces the Windows-style custom titlebar and resize borders with the native macOS window frame on Q_OS_DARWIN. The custom FramelessWindowHint approach looks out of place on macOS and causes usability issues.

Changes

  • DSView/pv/mainframe.cpp: On macOS, use Qt::Window instead of FramelessWindowHint, skip creating TitleBar and Border widgets, use QGridLayout directly for the main window
  • DSView/pv/mainwindow.cpp: Add #ifndef Q_OS_DARWIN guard for title_bar assertion since it's NULL on macOS

Tested

  • macOS 15 (Apple Silicon, arm64 native build)
  • Windows/Linux behavior is unchanged (all changes are guarded by #ifdef Q_OS_DARWIN)

Screenshot

Before: Custom Windows-style titlebar with DSL logo, minimize/maximize/close buttons
After: Native macOS window frame with standard traffic light buttons and proxy icon


This addresses the request for native macOS arm64 builds (see v1.3.2-arm64 release with prebuilt .dmg at https://github.com/ZiWei09/DSView/releases).

On macOS, skip the Windows-style frameless window with custom TitleBar
and resize Borders. Use Qt::Window with native decorations instead.
Add NULL guards for _titleBar since it's not created on macOS.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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