-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix window decorations #11440
Fix window decorations #11440
Conversation
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.
Reading https://ux.stackexchange.com/a/125593/93436 and https://unix.stackexchange.com/q/43106/18033, I think there should be an option whether JabRef should remember its size. Default should be yes on Windows and no on Linux.
I am even thinking to put "no" as default on Windows, because when users have "FancyZones" installed, the Window management should be better...
preferences.setPositionY(mainStage.getY()); | ||
preferences.setSizeX(mainStage.getWidth()); | ||
preferences.setSizeY(mainStage.getHeight()); | ||
} | ||
preferences.setWindowMaximised(mainStage.isMaximized()); |
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.
I would drop this line, too.
This should keep the fix at #4939
Note: The Example for [javafx.stage.Screen@ede6e680 bounds:Rectangle2D [minX=0.0, minY=0.0, maxX=1600.0, maxY=2560.0, width=1600.0, height=2560.0] visualBounds:Rectangle2D [minX=0.0, minY=156.0, maxX=1600.0, maxY=2560.0, width=1600.0, height=2404.0] dpi:125.0 outputScale:(1.5,1.5), javafx.stage.Screen@42b22ab3 bounds:Rectangle2D [minX=5440.0, minY=96.0, maxX=6880.0, maxY=2656.0, width=1440.0, height=2560.0] visualBounds:Rectangle2D [minX=5440.0, minY=96.0, maxX=6880.0, maxY=2616.0, width=1440.0, height=2520.0] dpi:108.0 outputScale:(1.0,1.0), javafx.stage.Screen@21359912 bounds:Rectangle2D [minX=1600.0, minY=232.0, maxX=5440.0, maxY=2392.0, width=3840.0, height=2160.0] visualBounds:Rectangle2D [minX=1600.0, minY=232.0, maxX=5440.0, maxY=2352.0, width=3840.0, height=2120.0] dpi:139.0 outputScale:(1.0,1.0)] |
I enabled debug output, added more things to debug output and included also more checks for "out of bounds". Lets see, if this matches more cases. |
We could always save the screen position if user moves the window. In case the user fixes the window position and then maximizes JabRef and then quits, the user-fixed window position is not stored. |
There was no follow-up on my PR comment. I think, it is good to go as is, since it brings things forward (and unblocks #11441). Therefore, approved and added to the merge queue. |
The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build. |
Refs #10731
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)