-
Notifications
You must be signed in to change notification settings - Fork 7
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
Filter buttons are positioned wrong when starting from empty panel #218
Labels
Milestone
Comments
mlopatkin
added
a:bug
Something isn't working
in:gui
Tweaking GUI, implementing new UI
affects-version:0.21
labels
Jan 9, 2022
On Windows, the alignment is fine, and jump in size when deleting the last filter is less prominent. Both systems are running in 125%. |
mlopatkin
added a commit
that referenced
this issue
Jan 13, 2022
The JPanel's default FlowLayout adds 5px paddings on top and bottom. Without any filter buttons it is of no concern as the panel with(out) buttons has a desired height of 0, so it is stretched out to the size of the container. When the filter button appears, these paddings are applied and this caused the FilterPanel to become 10px taller. The fix is to remove the default paddings from the inner JPanel. Instead, some paddings were added to the FilterPanel itself to achieve a more pleasant look. Additionally, a "revalidate()+repaint()" spell is now used when the filter is added. Without this, the change in height is not propagated to the FilterPanel (thought there is no more change in height). Issue: #218
mlopatkin
added a commit
that referenced
this issue
Jan 13, 2022
The JPanel's default FlowLayout adds 5px paddings on top and bottom. Without any filter buttons it is of no concern as the panel with(out) buttons has a desired height of 0, so it is stretched out to the size of the container. When the filter button appears, these paddings are applied and this caused the FilterPanel to become 10px taller. The fix is to remove the default paddings from the inner JPanel. Instead, some paddings were added to the FilterPanel itself to achieve a more pleasant look. Additionally, a "revalidate()+repaint()" spell is now used when the filter is added. Without this, the change in height is not propagated to the FilterPanel (thought there is no more change in height). Issue: #218
mlopatkin
added a commit
that referenced
this issue
Jan 13, 2022
The JPanel's default FlowLayout adds 5px paddings on top and bottom. Without any filter buttons it is of no concern as the panel with(out) buttons has a desired height of 0, so it is stretched out to the size of the container. When the filter button appears, these paddings are applied and this caused the FilterPanel to become 10px taller. The fix is to remove the default paddings from the inner JPanel. Instead, some paddings were added to the FilterPanel itself to achieve a more pleasant look. Additionally, a "revalidate()+repaint()" spell is now used when the filter is added. Without this, the change in height is not propagated to the FilterPanel (thought there is no more change in height). Issue: #218
Ok. I fixed Linux, but the Windows is now broken. Guess, FlatLaF adds some space for the panel on Windows by defaut. |
On Linux with 125% scaling and Java 8 we have:
|
On Windows with the same we have this:
|
mlopatkin
added a commit
that referenced
this issue
Jan 14, 2022
mlopatkin
added a commit
that referenced
this issue
Jan 14, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Steps to reproduce:
Resize fixes.
The filter panel also shrinks if all filters are deleted.
The text was updated successfully, but these errors were encountered: