Skip to content

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

Merged
calixtus merged 3 commits into
JabRef:masterfrom
yinpeiqi:fix-for-issue-6818
Mar 11, 2021
Merged

Fixed columns shrink in width when enlarging the JabRef window#7507
calixtus merged 3 commits into
JabRef:masterfrom
yinpeiqi:fix-for-issue-6818

Conversation

@yinpeiqi

@yinpeiqi yinpeiqi commented Mar 9, 2021

Copy link
Copy Markdown
Contributor

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

@tobiasdiez tobiasdiez left a comment

Copy link
Copy Markdown
Member

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

yinpeiqi commented Mar 9, 2021

Copy link
Copy Markdown
Contributor Author

@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

koppor commented Mar 11, 2021

Copy link
Copy Markdown
Member

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

@calixtus calixtus left a comment

Copy link
Copy Markdown
Member

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