JIDE: JideTabbedPane: tab layout fixes for compact resize mode

This commit is contained in:
Karl Tauber
2021-03-27 17:03:49 +01:00
parent 2a00de11f1
commit d7b0754327
8 changed files with 33 additions and 4 deletions

View File

@@ -507,6 +507,29 @@ public class FlatJideTabbedPaneUI
return lastTabInRun( _tabPane.getTabCount(), run ) == tabIndex;
}
@Override
protected void ensureCurrentRects( int leftMargin, int tabCount ) {
int oldFitStyleBoundSize = _fitStyleBoundSize;
int oldFitStyleFirstTabMargin = _fitStyleFirstTabMargin;
int oldCompressedStyleNoIconRectSize = _compressedStyleNoIconRectSize;
int oldCompressedStyleIconMargin = _compressedStyleIconMargin;
int oldFixedStyleRectSize = _fixedStyleRectSize;
_fitStyleBoundSize = scale( _fitStyleBoundSize );
_fitStyleFirstTabMargin = scale( _fitStyleFirstTabMargin );
_compressedStyleNoIconRectSize = scale( _compressedStyleNoIconRectSize );
_compressedStyleIconMargin = scale( _compressedStyleIconMargin );
_fixedStyleRectSize = scale( _fixedStyleRectSize );
super.ensureCurrentRects( leftMargin, tabCount );
_fitStyleBoundSize = oldFitStyleBoundSize;
_fitStyleFirstTabMargin = oldFitStyleFirstTabMargin;
_compressedStyleNoIconRectSize = oldCompressedStyleNoIconRectSize;
_compressedStyleIconMargin = oldCompressedStyleIconMargin;
_fixedStyleRectSize = oldFixedStyleRectSize;
}
@Override
public void ensureCloseButtonCreated() {
super.ensureCloseButtonCreated();

View File

@@ -84,3 +84,5 @@ JideTabbedPane.shadow = $TabbedPane.shadow
JideTabbedPane.closeButtonLeftMargin = 0
JideTabbedPane.closeButtonRightMargin = 0
JideTabbedPane.fitStyleBoundSize = {integer}0
JideTabbedPane.fitStyleFirstTabMargin = 0