mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
merged PR #62 into master (with minor modifications)
Feat 59 Option to allow tabbed pane separator to take full height
This commit is contained in:
@@ -8,6 +8,9 @@ FlatLaf Change Log
|
|||||||
bottom. (issue #34)
|
bottom. (issue #34)
|
||||||
- ProgressBar: Fixed visual artifacts in indeterminate mode, on HiDPI screens at
|
- ProgressBar: Fixed visual artifacts in indeterminate mode, on HiDPI screens at
|
||||||
125%, 150% and 175% scaling, when the progress moves around.
|
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
|
## 0.26
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
* @uiDefault TabbedPane.tabSelectionHeight int
|
* @uiDefault TabbedPane.tabSelectionHeight int
|
||||||
* @uiDefault TabbedPane.contentSeparatorHeight int
|
* @uiDefault TabbedPane.contentSeparatorHeight int
|
||||||
* @uiDefault TabbedPane.showTabSeparators boolean
|
* @uiDefault TabbedPane.showTabSeparators boolean
|
||||||
|
* @uiDefault TabbedPane.tabSeparatorsFullHeight boolean
|
||||||
* @uiDefault TabbedPane.hasFullBorder boolean
|
* @uiDefault TabbedPane.hasFullBorder boolean
|
||||||
*
|
*
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
@@ -103,6 +104,7 @@ public class FlatTabbedPaneUI
|
|||||||
protected int tabSelectionHeight;
|
protected int tabSelectionHeight;
|
||||||
protected int contentSeparatorHeight;
|
protected int contentSeparatorHeight;
|
||||||
protected boolean showTabSeparators;
|
protected boolean showTabSeparators;
|
||||||
|
protected boolean tabSeparatorsFullHeight;
|
||||||
protected boolean hasFullBorder;
|
protected boolean hasFullBorder;
|
||||||
protected boolean tabsOverlapBorder;
|
protected boolean tabsOverlapBorder;
|
||||||
|
|
||||||
@@ -128,6 +130,7 @@ public class FlatTabbedPaneUI
|
|||||||
tabSelectionHeight = UIManager.getInt( "TabbedPane.tabSelectionHeight" );
|
tabSelectionHeight = UIManager.getInt( "TabbedPane.tabSelectionHeight" );
|
||||||
contentSeparatorHeight = UIManager.getInt( "TabbedPane.contentSeparatorHeight" );
|
contentSeparatorHeight = UIManager.getInt( "TabbedPane.contentSeparatorHeight" );
|
||||||
showTabSeparators = UIManager.getBoolean( "TabbedPane.showTabSeparators" );
|
showTabSeparators = UIManager.getBoolean( "TabbedPane.showTabSeparators" );
|
||||||
|
tabSeparatorsFullHeight = UIManager.getBoolean( "TabbedPane.tabSeparatorsFullHeight" );
|
||||||
hasFullBorder = UIManager.getBoolean( "TabbedPane.hasFullBorder" );
|
hasFullBorder = UIManager.getBoolean( "TabbedPane.hasFullBorder" );
|
||||||
tabsOverlapBorder = UIManager.getBoolean( "TabbedPane.tabsOverlapBorder" );
|
tabsOverlapBorder = UIManager.getBoolean( "TabbedPane.tabsOverlapBorder" );
|
||||||
|
|
||||||
@@ -307,7 +310,7 @@ public class FlatTabbedPaneUI
|
|||||||
!isLastInRun( tabIndex ) )
|
!isLastInRun( tabIndex ) )
|
||||||
{
|
{
|
||||||
float sepWidth = UIScale.scale( 1f );
|
float sepWidth = UIScale.scale( 1f );
|
||||||
float offset = UIScale.scale( 5f );
|
float offset = tabSeparatorsFullHeight ? 0 : UIScale.scale( 5f );
|
||||||
|
|
||||||
g.setColor( (tabSeparatorColor != null) ? tabSeparatorColor : contentAreaColor );
|
g.setColor( (tabSeparatorColor != null) ? tabSeparatorColor : contentAreaColor );
|
||||||
if( tabPlacement == LEFT || tabPlacement == RIGHT ) {
|
if( tabPlacement == LEFT || tabPlacement == RIGHT ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user