-
Notifications
You must be signed in to change notification settings - Fork 91
fix: app doesn't close to tray when [x] is pressed #19435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| Qt.application.version = aboutModule.getCurrentVersion() | ||
| return Qt.application.displayName | ||
| } | ||
| visible: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't set the visible property, conflicts with visibility:
// WRN 2025-11-26 <snip> file=qrc:/main.qml:26 text="QML QQuickWindowQmlImpl*: Conflicting properties 'visible' and 'visibility'"
| geometry = Qt.rect(0, | ||
| 0, | ||
| Math.min(Screen.desktopAvailableWidth - 125, 1400), | ||
| Math.min(Screen.desktopAvailableHeight - 125, 840)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed hardcoded window size
Jenkins BuildsClick to see older builds (38)
|
f0b1ad5 to
b4ce19b
Compare
jrainville
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We should test the different OSes before merging this time to make sure we didn't regress on another one again 😄
|
|
||
| property bool isFleetSelectionEnabled | ||
| property bool isBrowserEnabled: true | ||
| property bool minimizeOnCloseOptionVisible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe minimizeOnCloseOptionAvailable would be more accurate?
edit: I see that in AppMain you call it minimizeOnCloseOptionAvailable too, so IMo we could keep that name at all times 😄
b4ce19b to
c076236
Compare
- hide the window instead of minimizing (except when on macOS or mobile) - hide the advanced "Minimize to tray icon on close" option, making the copy explicitly mention the "tray icon" - fix some runtime warnings Fixes #19364
c076236 to
74671f9
Compare
|
Hey @caybro, here's some results from Mac. It seems like there is 1 bug. If the app window is closed with X then it cannot be restored from the dock icon, only the icon in the menu bar along the top. Given that closing with the X in the window controls leaves the app in the dock it also seems like there is not a significant difference to minimising, which is a bit confusing. With minimise to tray enabled: App window controls
Status icon in menu bar
Dock controls
|
OK, I see that the process is quite different on mac, and indeed closing doesn't make much difference to minimizing the window. I'll restore the previous behavior on macOS that would minimize on close. |
That's expected, we always quit here because we don't have the user's setting for the "minimizeOnClose" (and no tray icon yet either) |
What does the PR do
Fixes #19364
Affected areas
AppMain/Settings
Architecture compliance
My PR is consistent with this document: QML Architecture Guidelines
Screencapture of the functionality
Impact on end user
Consistent close window behavior
How to test
Risk