Skip to content

Commit

Permalink
gui: do not allow MainWindow to be resized
Browse files Browse the repository at this point in the history
previously macOS let you resize the activity window, resulting in
strange visual artifacts...

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
  • Loading branch information
nilsding committed Mar 3, 2025
1 parent f86f5af commit 0963856
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/gui/tray/MainWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,16 @@ ApplicationWindow {

readonly property int maxMenuHeight: Style.trayWindowHeight - Style.trayWindowHeaderHeight - 2 * Style.trayWindowBorderWidth

Component.onCompleted: Systray.forceWindowInit(trayWindow)
Component.onCompleted: {
Systray.forceWindowInit(trayWindow)
if (Systray.useNormalWindow) {
return;
}

// do not allow this window to be resized when it's frameless
this.minimumWidth = this.maximumWidth = this.width
this.minimumHeight = this.maximumHeight = this.height
}

// Close tray window when focus is lost (e.g. click somewhere else on the screen)
onActiveChanged: {
Expand Down

0 comments on commit 0963856

Please sign in to comment.