Theme: bring back visual feedback on toolbar button press

And also on toolbar button hover.
Fixes: https://github.com/FreeCAD/FreeCAD/issues/22747
This commit is contained in:
Furgo
2025-09-05 13:44:37 +02:00
committed by Chris Hennes
parent 001bab4439
commit 26995b7f67

View File

@@ -1306,10 +1306,28 @@ QToolButton:hover {
background-color: @GeneralBackgroundHoverColor;
}
/*
* Hover state: Add a visible border to create the frame effect.
* This rule is more specific than the theme's general QToolButton:hover, so it will apply only to
* toolbar buttons.
*/
QToolBar QToolButton:hover {
border: 1px solid @ButtonBorderColor;
}
QToolButton:pressed {
background-color: @GeneralBackgroundHoverColor;
}
/*
* Pressed state: Add an "inset" border style and gradient to create the "pushed in" look.
*/
QToolBar QToolButton:hover:pressed {
border: 1px solid @ButtonBorderColor;
border-style: inset;
background-color: @PrimaryColorDarken2;
}
QToolButton:selected {
border: 1px solid @GeneralBackgroundHoverColor;
}