From 3a3951ce9edb3d152d7238d5f782b82d5fa86109 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 26 Oct 2018 15:58:41 +0200 Subject: [PATCH] Fix display of radio buttons Previously, unchecked radio buttons were not displayed. --- src/main/java/org/jabref/gui/Base.css | 22 +++- .../org/jabref/styletester/StyleTester.fxml | 119 +++++++++++------- 2 files changed, 96 insertions(+), 45 deletions(-) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index a8644b5c180..ed4bbd29f96 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -391,12 +391,32 @@ } .check-box > .box > .mark { - -fx-background-color: white; + -fx-background-color: -fx-control-inner-background; -fx-padding: 0.2em 0.2em 0.2em 0.2em; -fx-shape: "M6.61 11.89L3.5 8.78 2.44 9.84 6.61 14l8.95-8.95L14.5 4z"; -fx-stroke-width: 5; } +.radio-button > .radio { + -fx-background-radius: 1.0em; /* large value to make sure this remains circular */ + -fx-padding: 0.35em; /* padding from outside edge to the inner dot */ + -fx-background-color: rgba(0, 0, 0, 0.54), -fx-control-inner-background; + -fx-background-insets: 0, 2px; +} + +.radio-button:selected > .radio { + -fx-background-color: -jr-checked, -fx-background; +} + +.radio-button > .radio > .dot { + -fx-padding: 0.25em; /* radius of the inner dot when selected */ + -fx-background-insets: 0; +} + +.radio-button:selected > .radio > .dot { + -fx-background-color: -jr-checked; +} + .menu-bar { -fx-background-color: -jr-menu-background; -fx-background-insets: 0; diff --git a/src/main/java/org/jabref/styletester/StyleTester.fxml b/src/main/java/org/jabref/styletester/StyleTester.fxml index 8ace521ed71..6eaf7bae249 100644 --- a/src/main/java/org/jabref/styletester/StyleTester.fxml +++ b/src/main/java/org/jabref/styletester/StyleTester.fxml @@ -28,147 +28,178 @@ + + - + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - +