-
-
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
Maximize the duplicate entries dialog #9278
Conversation
Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds(); | ||
this.setX(primaryScreenBounds.getMinX()); | ||
this.setY(primaryScreenBounds.getMinY()); | ||
this.setWidth(primaryScreenBounds.getWidth()); | ||
this.setHeight(primaryScreenBounds.getHeight()); |
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.
This always maximizes the dialog. IMHO, the dialog position should be changed if the new position would be not completely in the screen / completely visible. Other than that, the "old" size should be used. I am not sure how to implement that - maybe let this handled by the operating system and no additional code by JabRef.
Today I had a look at this pr and tested it with Linux Mint Cinnamon (1366x768) and a second screen (1920x1080) and it all worked perfectly (except that my mouse sometimes was hitting a slight "barrier" when moving from screen 1 to screen 2 and vice versa, but I think that is probably not caused by JabRef).
Edit: I have such a small screen on my laptop, that the original size is almost as big as a maximized screen, so I barely notice a difference, but I could imagine that people with a larger screen size would not want this window to maximize everytime it pops up... |
This was the point of my code comment! - I have a screen resolution of 3440x1440 and I don't want that an application automatically maximizes a window. Especially at the merge entries dialog, I cannot really get what belongs togehter: |
What's the status here? |
The status is following: The PR works, but Koppor does not like maximized screen everytime there is a dialogue popup... so I am closing to reduce the number of open pull-requests |
Fixes #9055
I think this issue is asking to make the merge dialog as large as possible but within the size of the screen. Initially, when the main window of Jabref is placed in the top left-hand corner of the screen, the merge pop-up is off-screen. My solution is to get
the primary screen bound first, then set the initial size of the dialog based on the primary screen bound. So after the first run of the new dialog, it will show all the merge information with no part of it out-of-screen, although it's not a full-screen show. It has the maximum width, but not the highest height.
I kept it able to retrieve the previous window state and set the new dialog window size and position to match it. Since it's initially set to maximum, running it again without changing its size will keep the dialog large.
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)