George-Devel commented on code in PR #3712:
URL: https://github.com/apache/netbeans/pull/3712#discussion_r849931066
##########
platform/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/BasicScrollingTabDisplayerUI.java:
##########
@@ -468,20 +468,7 @@ protected Rectangle getControlButtonsRectangle( Container
parent ) {
@Override
public Dimension getMinimumSize(JComponent c) {
- int index = displayer.getSelectionModel().getSelectedIndex();
- TabDataModel model = displayer.getModel();
- if (model.size() == 0) {
- return new Dimension(0, 0);
- }
- if( index < 0 || index >= model.size() )
- index = 0;
- Component comp = model.getTab(index).getComponent();
- if( null == comp )
- comp = displayer.getComponentConverter().getComponent(
model.getTab( index ) );
- Dimension minSize = null == comp ? new Dimension( 100, 10 ) :
comp.getMinimumSize();
- minSize.width = Math.max(minSize.width, 100);
- minSize.height = Math.max(minSize.height, 10);
- return minSize;
+ return new Dimension( 100, displayer.getSize().height);
Review Comment:
Ok, I will change this. I'll also have look at `AbstractViewTabDisplayerUI
`. I see that this is used if "Multi-row tabs" is selected in the Appearance
options . It seems that `AbstractViewTabDisplayerUI.getMinimumSize` returns
height of a single tab even then multiple rows are displayed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists