From 06a9c5665656dc6b6a06e73a8c2f08497cadd772 Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Sun, 19 Oct 2025 23:41:27 +0200 Subject: [PATCH] Stylesheets: Fix checked QToolButton style --- src/Gui/Stylesheets/FreeCAD.qss | 4 ++-- src/Gui/Stylesheets/parameters/FreeCAD Dark.yaml | 2 ++ src/Gui/Stylesheets/parameters/FreeCAD Light.yaml | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Gui/Stylesheets/FreeCAD.qss b/src/Gui/Stylesheets/FreeCAD.qss index ef45a6cbb0..d330e6edfc 100644 --- a/src/Gui/Stylesheets/FreeCAD.qss +++ b/src/Gui/Stylesheets/FreeCAD.qss @@ -1202,7 +1202,7 @@ QPushButton:disabled { } QPushButton:checked { - background-color: qlineargradient(x1:0, y1:1, x2:0, y2:0, stop:0 @ButtonTopBackgroundColor, stop:0.6 @ButtonBottomBackgroundColor); + background-color: qlineargradient(x1:0, y1:1, x2:0, y2:0, stop:0 @CheckedButtonTopBackgroundColor, stop:1 @CheckedButtonBottomBackgroundColor); } QPushButton:focus, QAbstractButton[flat="true"]:focus { @@ -1588,7 +1588,7 @@ QSint--ActionGroup QFrame[class="content"] QToolButton { } QSint--ActionGroup QFrame[class="content"] QToolButton:checked { - background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 @ButtonTopBackgroundColor, stop:1 @ButtonBottomBackgroundColor ); + background-color: qlineargradient(x1:0, y1:1, x2:0, y2:0, stop:0 @CheckedButtonTopBackgroundColor, stop:1 @CheckedButtonBottomBackgroundColor); } /* hide the empty line between header and content */ diff --git a/src/Gui/Stylesheets/parameters/FreeCAD Dark.yaml b/src/Gui/Stylesheets/parameters/FreeCAD Dark.yaml index a5413ffec7..c287db2fbe 100644 --- a/src/Gui/Stylesheets/parameters/FreeCAD Dark.yaml +++ b/src/Gui/Stylesheets/parameters/FreeCAD Dark.yaml @@ -4,6 +4,8 @@ ButtonBorderColor: "@GeneralBorderColor" ButtonBorderHooverColor: "@GeneralBorderColor" ButtonBottomBackgroundColor: "@PrimaryColorLighten2" ButtonTopBackgroundColor: "@PrimaryColorLighten3" +CheckedButtonBottomBackgroundColor: "darken(@ButtonBottomBackgroundColor, 5)" +CheckedButtonTopBackgroundColor: "darken(@ButtonTopBackgroundColor, 5)" DefaultButtonBottomBackgroundColor: "blend(@ButtonBottomBackgroundColor, @AccentColor, 10)" DefaultButtonTopBackgroundColor: "blend(@ButtonTopBackgroundColor, @AccentColor, 10)" DefaultButtonBorderColor: "blend(@ButtonBorderColor, @AccentColor, 20)" diff --git a/src/Gui/Stylesheets/parameters/FreeCAD Light.yaml b/src/Gui/Stylesheets/parameters/FreeCAD Light.yaml index 667f158e0c..0883a69ab4 100644 --- a/src/Gui/Stylesheets/parameters/FreeCAD Light.yaml +++ b/src/Gui/Stylesheets/parameters/FreeCAD Light.yaml @@ -4,6 +4,8 @@ ButtonBorderColor: "@GeneralBorderColor" ButtonBorderHooverColor: "@GeneralBorderColor" ButtonBottomBackgroundColor: "@PrimaryColorDarken1" ButtonTopBackgroundColor: "@PrimaryColorLighten3" +CheckedButtonBottomBackgroundColor: "darken(@ButtonBottomBackgroundColor, 5)" +CheckedButtonTopBackgroundColor: "darken(@ButtonTopBackgroundColor, 5)" DefaultButtonBottomBackgroundColor: "blend(@ButtonBottomBackgroundColor, @AccentColor, 5)" DefaultButtonTopBackgroundColor: "blend(@ButtonTopBackgroundColor, @AccentColor, 5)" DefaultButtonBorderColor: "blend(@ButtonBorderColor, @AccentColor, 40)"