-
Notifications
You must be signed in to change notification settings - Fork 822
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
Using the size of the tabs as minimum size. #3712
Using the size of the tabs as minimum size. #3712
Conversation
See Netbeans issue apache#3710
Hi, my code change may look weird, but this component is responsible for drawing the tab-bar in the editor area. This is only the part of the "North" component of a border layout. The minimum size of the actual content is the "Center" component and is considered by the panel. You can check, that this works correctly by trying the Platform Application attached to the bug. |
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 agree that BasicScrollingTabDisplayerUI.getMinimumSize()
should return only the minimum size of the tabs.
Currently it returns the the minimum size of the tabs plus the minimum size of the tab content.
getPreferredSize()
in BasicScrollingTabDisplayerUI
subclasses also return only preferred size of the tabs.
For some unknown reason, this was added in 2008 in commit: emilianbold/netbeans-releases@82a48e9#diff-2f04bb43144858669541be39da8de41c29eef37380e8a2b3ce26dce479c92534
This is the related issue: https://bz.apache.org/netbeans/show_bug.cgi?id=136636
Don't understand the need for this BasicScrollingTabDisplayerUI.getMinimumSize()
implementation. Maybe some part of the windowing system worked different in 2008 that it does today...
There is a similar getMinimumSize()
method in AbstractViewTabDisplayerUI
, which was added in the same commit:
emilianbold/netbeans-releases@82a48e9#diff-c2ceef123f96cb6d9bbb42f06afa4cdc636d72746b85139890a4774e6caddac2
Maybe this also needs to be changed? But maybe only if isUseStretchingTabs()
returns true
.
....n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/BasicScrollingTabDisplayerUI.java
Outdated
Show resolved
Hide resolved
@DevCharly - I changed the line as requested. I also replaced 'getMinimumSize()' in My assumption that the |
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.
Thanks for reviewing, @DevCharly! The change sound fine with me... I'll test this in my IDE and NetBeans Platform application the next time I do a build, but no need to wait for that.
Well, it is approved. Let's merge it then! |
See Netbeans issue #3710