JIDE: JideTabbedPane: fixed close button in tab area, which was visible even if shown on tabs (regression in previous commit)

This commit is contained in:
Karl Tauber
2021-04-13 12:06:28 +02:00
parent 2e7637f274
commit 992349da8c
3 changed files with 9 additions and 14 deletions

View File

@@ -709,7 +709,7 @@ public class FlatJideTabbedPaneUI
}
private void updateArrowButtons() {
if( !scrollableTabLayoutEnabled() )
if( !scrollableTabLayoutEnabled() || !_tabPane.isTabShown() )
return;
Insets insets = _tabPane.getInsets();
@@ -739,7 +739,8 @@ public class FlatJideTabbedPaneUI
y += tabAreaInsets.top;
// layout buttons
x = layoutButtonHorizontal( _tabScroller.closeButton, 16, x, y, h, leftToRight );
if( !isShowCloseButtonOnTab() )
x = layoutButtonHorizontal( _tabScroller.closeButton, 16, x, y, h, leftToRight );
x = layoutButtonHorizontal( _tabScroller.listButton, 24, x, y, h, leftToRight );
x = layoutButtonHorizontal( _tabScroller.scrollForwardButton, 16, x, y, h, leftToRight );
x = layoutButtonHorizontal( _tabScroller.scrollBackwardButton, 16, x, y, h, leftToRight );
@@ -770,7 +771,8 @@ public class FlatJideTabbedPaneUI
x += tabAreaInsets.left;
// layout buttons
y = layoutButtonVertical( _tabScroller.closeButton, 16, x, y, w );
if( !isShowCloseButtonOnTab() )
y = layoutButtonVertical( _tabScroller.closeButton, 16, x, y, w );
y = layoutButtonVertical( _tabScroller.listButton, 24, x, y, w );
y = layoutButtonVertical( _tabScroller.scrollForwardButton, 16, x, y, w );
y = layoutButtonVertical( _tabScroller.scrollBackwardButton, 16, x, y, w );