From 2459a3654bdc0918d2477362577f4d914e6cc916 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 14 Jan 2020 10:51:07 +0100 Subject: [PATCH] TabbedPane: hide cropped line in scroll-tab-layout (issue #40) --- CHANGELOG.md | 1 + .../src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java | 2 +- .../src/main/resources/com/formdev/flatlaf/FlatLaf.properties | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 138a9fe2..8f40cd62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FlatLaf Change Log ## Unreleased +- TabbedPane: In scroll-tab-layout, the cropped line is now hidden. (issue #40) - Tree: UI default value `Tree.textBackground` now has a valid color and is no longer `null`. 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 06d278d5..a4418f32 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 @@ -181,7 +181,7 @@ public class FlatTabbedPaneUI protected JButton createScrollButton( int direction ) { // this method is invoked before installDefaults(), so we can not use color fields here return new FlatArrowButton( direction, UIManager.getString( "Component.arrowType" ), - UIManager.getColor( "TabbedPane.shadow" ), + UIManager.getColor( "TabbedPane.foreground" ), UIManager.getColor( "TabbedPane.disabledForeground" ), null, UIManager.getColor( "TabbedPane.hoverColor" ) ); } diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties index ce303fb2..a1d878fa 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -366,7 +366,7 @@ TabbedPane.tabAreaInsets=0,0,0,0 TabbedPane.selectedTabPadInsets=0,0,0,0 TabbedPane.tabRunOverlay=0 TabbedPane.tabsOverlapBorder=true -TabbedPane.shadow=$ComboBox.buttonArrowColor +TabbedPane.shadow=@background #---- Table ----