From 934eb9fc1dd0e12e0774a61aa7443aec54174746 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 23 May 2020 13:51:25 +0200 Subject: [PATCH] ScrollBar: use rounded thumb on Linux (issue #103) --- .../main/resources/com/formdev/flatlaf/FlatLaf.properties | 3 +++ .../testing/uidefaults/FlatDarkLaf_1.8.0_202-linux.txt | 6 ++++++ .../testing/uidefaults/FlatLightLaf_1.8.0_202-linux.txt | 6 ++++++ 3 files changed, 15 insertions(+) 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 c408f1f7..4d4a5f59 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -435,6 +435,9 @@ ScrollBar.buttonArrowColor=$ComboBox.buttonArrowColor ScrollBar.buttonDisabledArrowColor=$ComboBox.buttonDisabledArrowColor ScrollBar.allowsAbsolutePositioning=true +[linux]ScrollBar.thumbInsets=2,2,2,2 +[linux]ScrollBar.thumbArc=999 + #---- ScrollPane ---- diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-linux.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-linux.txt index 129e184f..b25d8e0b 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-linux.txt +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-linux.txt @@ -7,6 +7,12 @@ - ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI] + ProgressBar.font [active] Cantarell plain 13 javax.swing.plaf.FontUIResource [UI] +- ScrollBar.thumbArc 0 ++ ScrollBar.thumbArc 999 + +- ScrollBar.thumbInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI] ++ ScrollBar.thumbInsets 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI] + - defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI] + defaultFont Cantarell plain 15 javax.swing.plaf.FontUIResource [UI] diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-linux.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-linux.txt index 129e184f..b25d8e0b 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-linux.txt +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-linux.txt @@ -7,6 +7,12 @@ - ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI] + ProgressBar.font [active] Cantarell plain 13 javax.swing.plaf.FontUIResource [UI] +- ScrollBar.thumbArc 0 ++ ScrollBar.thumbArc 999 + +- ScrollBar.thumbInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI] ++ ScrollBar.thumbInsets 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI] + - defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI] + defaultFont Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]