You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/04/13 21:58:08 UTC
[GitHub] [netbeans] George-Devel commented on a diff in pull request #3712: Using the size of the tabs as minimum size.
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists