Skip to content
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

Fixed columns shrink in width when enlarging the JabRef window #7507

Merged
merged 3 commits into from
Mar 11, 2021
Merged

Fixed columns shrink in width when enlarging the JabRef window #7507

merged 3 commits into from
Mar 11, 2021

Conversation

yinpeiqi
Copy link
Contributor

@yinpeiqi yinpeiqi commented Mar 9, 2021

In method 'resize', in order to make sure that we are staying under the total table width, the program used to reduce the newSize by two for every column. Cause the method will be call for many times, that will occur the problem which shown in the video in issue 6818. I do a little bit modify for this implement of controlling width, which is reduce the width only if the current width exceed the total width and only reduce for the surplus part.
Fixes #6818

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

Before:

before.mp4

After:

after.mp4

Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice that you found this mistake. It was hunting us for a very long time now.

There is a proposal to completely rewrite the resize policy in #7181. But since this still needs some work until this is finished, I propose to merge this PR nonetheless. Maybe this makes #7181 actually obsolete - I'll let @koppor and @DominikVoigt decide this.

@yinpeiqi
Copy link
Contributor Author

yinpeiqi commented Mar 9, 2021

@tobiasdiez Thanks for your acknowledgment

@tobiasdiez tobiasdiez added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Mar 10, 2021
@koppor
Copy link
Member

koppor commented Mar 11, 2021

@tobiasdiez No, it does not make it obsolete. Even though, I am for +1 for this quick fix.

Copy link
Member

@calixtus calixtus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix. It should work with the current implementation of the SmartConstrainedResizePolicy and I'm going to merge it (after two approvals).
However, it's no substitute for the long term solution @koppor and @DominikVoigt proposed, because this PR still depends on reflection. So please don't be too sad, if sooner or later this SmartConstrainedResizePolicy will be removed.

@calixtus calixtus changed the title Fix columns shrink in width when we try to enlarge JabRef window Fixed columns shrink in width when enlarging the JabRef window Mar 11, 2021
@calixtus calixtus merged commit 8bb7668 into JabRef:master Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When enlarging JabRef window, columns shrink in width
4 participants