Skip to content

Commit

Permalink
style: add old style custom switch for scopy theme
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Popa <andrei.popa@analog.com>
  • Loading branch information
andrei47w committed Feb 5, 2025
1 parent 39d9f63 commit ee178d2
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
3 changes: 2 additions & 1 deletion gui/style/json/Scopy.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"radius_interactive": "0",
"padding_interactive": "0",
"run_button_color": "#27B34F",
"qss_properties_button_borderButton": "qss_properties_button_basicButton"
"qss_properties_button_borderButton": "qss_properties_button_basicButton",
"qss_properties_widget_customSwitch": "qss_properties_widget_customSwitchSolid"
}

8 changes: 0 additions & 8 deletions gui/style/qss/generic/global.qss
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ QPushButton::pressed {
}

QComboBox::disabled {
color: &content_silent&;
border: &border_width& solid &interactive_subtle_disabled&;
border-bottom: &border_width_interactive& solid &interactive_subtle_disabled&;
border-radius: &radius_interactive&;
Expand All @@ -148,13 +147,6 @@ QComboBox {
border-bottom: &border_width_interactive& solid &interactive_subtle_idle&;
border-radius: &radius_interactive&;
background-color: &background_primary&;
color: &content_default&;
}
QComboBox::disabled {
border: none;
}
QComboBox::item::disabled {
color: &interactive_subtle_disabled&;
}
QComboBox::item:selected {
border-bottom: 0px solid none;
Expand Down
38 changes: 38 additions & 0 deletions gui/style/qss/properties/widget/customSwitchSolid.qss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
QWidget[&&property&&="left_on"] {
border-radius: &radius_1&;
max-height: &unit_2&;
min-height: &unit_2&;
padding: 0 &padding_1& 0 &padding_1&;
background-color: &interactive_primary_idle&;
border: none;
color: &content_default&;
}
QWidget[&&property&&="left_off"] {
border-top-left-radius: &radius_1&;
border-bottom-left-radius: &radius_1&;
max-height: &unit_2&;
min-height: &unit_2&;
padding: 0 &padding_1& 0 &padding_1&;
background-color: &background_subtle&;
border: none;
color: &content_silent&;
}
QWidget[&&property&&="right_on"] {
border-radius: &radius_1&;
max-height: &unit_2&;
min-height: &unit_2&;
padding: 0 &padding_1& 0 &padding_1&;
background-color: &interactive_primary_idle&;
border: none;
color: &content_default&;
}
QWidget[&&property&&="right_off"] {
border-top-left-radius: &radius_1&;
border-bottom-left-radius: &radius_1&;
max-height: &unit_2&;
min-height: &unit_2&;
padding: 0 &padding_1& 0 &padding_1&;
background-color: &background_subtle&;
border: none;
color: &content_silent&;
}

0 comments on commit ee178d2

Please sign in to comment.