From 08c439b46eb94e7b6cdf4b3f0b4035ba6f1b8e1f Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 23 May 2020 13:58:05 +0200 Subject: [PATCH] ScrollBar: use rounded thumb on macOS (issue #103) --- .../resources/com/formdev/flatlaf/FlatLaf.properties | 4 ++++ .../testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt | 9 +++++++++ .../testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt | 9 +++++++++ 3 files changed, 22 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 4d4a5f59..1354f284 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,10 @@ ScrollBar.buttonArrowColor=$ComboBox.buttonArrowColor ScrollBar.buttonDisabledArrowColor=$ComboBox.buttonDisabledArrowColor ScrollBar.allowsAbsolutePositioning=true +[mac]ScrollBar.thumbInsets=2,2,2,2 +[mac]ScrollBar.thumbArc=999 +[mac]ScrollBar.hoverThumbWithTrack=true + [linux]ScrollBar.thumbInsets=2,2,2,2 [linux]ScrollBar.thumbArc=999 diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt index 6b496222..4be7d02b 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt @@ -19,6 +19,15 @@ - ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI] + ProgressBar.font [active] .SF NS Text plain 11 javax.swing.plaf.FontUIResource [UI] +- ScrollBar.hoverThumbWithTrack false ++ ScrollBar.hoverThumbWithTrack true + +- 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 .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI] diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt index 6b496222..4be7d02b 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt @@ -19,6 +19,15 @@ - ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI] + ProgressBar.font [active] .SF NS Text plain 11 javax.swing.plaf.FontUIResource [UI] +- ScrollBar.hoverThumbWithTrack false ++ ScrollBar.hoverThumbWithTrack true + +- 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 .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]