Merge pull request #24752 from kadet1090/fix-various-stylesheet-issues

Stylesheets: Fix various stylesheet issues
This commit is contained in:
Chris Hennes
2025-10-20 08:45:34 -05:00
committed by GitHub
4 changed files with 19 additions and 23 deletions

View File

@@ -509,8 +509,6 @@ QMenu::item:disabled {
QMenu::separator {
height: 2px;
background-color: @PrimaryColor;
margin-left: 10%;
margin-right: 10%;
}
QMenu::item {
@@ -518,8 +516,8 @@ QMenu::item {
padding-left: 5px;
padding-top: 4px;
padding-bottom: 4px;
padding-right: 5px;
/* Reserve space for selection border */}
padding-right: 23px;
}
QMenu::item:selected {
background-color: @AccentBackgroundColor;
@@ -540,14 +538,13 @@ QMenu::indicator {
margin-right: 2px;
width: 12px;
height: 12px;
/* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
/* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */}
}
QMenu::icon:checked { /* appearance of a 'checked' icon */
background-color: @AccentColor;
margin-left: -5px;
border: 5px solid @AccentColor;
position: absolute;
}
QMenu::indicator:non-exclusive:unchecked {
@@ -589,36 +586,35 @@ QMenu::indicator:non-exclusive:indeterminate:focus, QMenu::indicator:non-exclusi
}
QMenu::indicator:exclusive:unchecked {
image: url(qss:@IconsLocationFolderName/transparent.svg);
image: url(qss:@IconsLocationFolderName/radio-unchecked-@StylesheetIconsColor.svg);
}
QMenu::indicator:exclusive:unchecked:hover, QMenu::indicator:exclusive:unchecked:focus, QMenu::indicator:exclusive:unchecked:pressed {
border-style: none;
outline: none;
background-color: @GeneralBackgroundHoverColor;
image: url(qss:@IconsLocationFolderName/checkbox-empty-@StylesheetIconsColor.svg);
image: url(qss:@IconsLocationFolderName/radio-unchecked-@StylesheetIconsColor.svg);
}
QMenu::indicator:exclusive:unchecked:disabled {
image: url(qss:@IconsLocationFolderName/checkbox-empty-@StylesheetIconsColor.svg);
image: url(qss:@IconsLocationFolderName/radio-unchecked-lightgray.svg);
}
QMenu::indicator:exclusive:checked {
border-style: none;
outline: none;
image: url(qss:@IconsLocationFolderName/checkbox-checked-@StylesheetIconsColor.svg);
image: url(qss:@IconsLocationFolderName/radio-checked-@StylesheetIconsColor.svg);
}
QMenu::indicator:exclusive:checked:hover, QMenu::indicator:exclusive:checked:focus, QMenu::indicator:exclusive:checked:pressed {
border-style: none;
outline: none;
background-color: @GeneralBackgroundHoverColor;
image: url(qss:@IconsLocationFolderName/checkbox-empty-@StylesheetIconsColor.svg);
}
QMenu::indicator:exclusive:checked:disabled {
outline: none;
image: url(qss:@IconsLocationFolderName/checkbox-checked-lightgray.svg);
image: url(qss:@IconsLocationFolderName/radio-checked-lightgray.svg);
}
QMenu::right-arrow {
@@ -1206,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 {
@@ -1592,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 */
@@ -1740,7 +1736,7 @@ QSlider::handle:vertical:focus {
https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qlineedit
--------------------------------------------------------------------------- */
QLineEdit, QTextEdit {
QLineEdit, QTextEdit, QPlainTextEdit {
background-color: @TextEditFieldBackgroundColor;
padding-top: 2px;
padding-bottom: 2px;
@@ -1751,16 +1747,16 @@ QLineEdit, QTextEdit {
border-radius: @InputFieldBorderRadius;
}
QLineEdit:disabled, QTextEdit:disabled {
QLineEdit:disabled, QTextEdit:disabled, QPlainTextEdit:disabled {
background-color: @GeneralDisabledBackgroundColor;
color @TextDisabledColor;
}
QLineEdit:focus, QTextEdit:focus {
QLineEdit:focus, QTextEdit:focus, QPlainTextEdit:focus {
border: 1px solid @AccentColor;
}
QLineEdit:selected, QTextEdit:selected {
QLineEdit:selected, QTextEdit:selected, QPlainTextEdit:selected {
background-color: @GeneralBackgroundHoverColor;
}

View File

@@ -1,7 +1,3 @@
QFrame {
border: none;
}
Gui--DockWnd--ReportOutput,
Gui--TaskView--TaskView QScrollArea {
border: none;

View File

@@ -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)"

View File

@@ -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)"