diff --git a/CHANGELOG.md b/CHANGELOG.md index d9ac68e8..e00dd4ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ FlatLaf Change Log bottom. (issue #34) - ProgressBar: Fixed visual artifacts in indeterminate mode, on HiDPI screens at 125%, 150% and 175% scaling, when the progress moves around. +- TabbedPane: New option to allow tab separators to take full height (to enable + use `UIManager.put( "TabbedPane.tabSeparatorsFullHeight", true );`). (issue + #59, PR #62) ## 0.26 diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java index 7d6415fb..5466dc0a 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java @@ -82,6 +82,7 @@ import com.formdev.flatlaf.util.UIScale; * @uiDefault TabbedPane.tabSelectionHeight int * @uiDefault TabbedPane.contentSeparatorHeight int * @uiDefault TabbedPane.showTabSeparators boolean + * @uiDefault TabbedPane.tabSeparatorsFullHeight boolean * @uiDefault TabbedPane.hasFullBorder boolean * * @author Karl Tauber @@ -103,6 +104,7 @@ public class FlatTabbedPaneUI protected int tabSelectionHeight; protected int contentSeparatorHeight; protected boolean showTabSeparators; + protected boolean tabSeparatorsFullHeight; protected boolean hasFullBorder; protected boolean tabsOverlapBorder; @@ -128,6 +130,7 @@ public class FlatTabbedPaneUI tabSelectionHeight = UIManager.getInt( "TabbedPane.tabSelectionHeight" ); contentSeparatorHeight = UIManager.getInt( "TabbedPane.contentSeparatorHeight" ); showTabSeparators = UIManager.getBoolean( "TabbedPane.showTabSeparators" ); + tabSeparatorsFullHeight = UIManager.getBoolean( "TabbedPane.tabSeparatorsFullHeight" ); hasFullBorder = UIManager.getBoolean( "TabbedPane.hasFullBorder" ); tabsOverlapBorder = UIManager.getBoolean( "TabbedPane.tabsOverlapBorder" ); @@ -307,7 +310,7 @@ public class FlatTabbedPaneUI !isLastInRun( tabIndex ) ) { float sepWidth = UIScale.scale( 1f ); - float offset = UIScale.scale( 5f ); + float offset = tabSeparatorsFullHeight ? 0 : UIScale.scale( 5f ); g.setColor( (tabSeparatorColor != null) ? tabSeparatorColor : contentAreaColor ); if( tabPlacement == LEFT || tabPlacement == RIGHT ) {