Skip to content

Commit

Permalink
gui / style: small fixes
Browse files Browse the repository at this point in the history
- vertical channel roundness
- spinbox bottom bline
- font

Signed-off-by: Andrei Popa <[email protected]>
  • Loading branch information
andrei47w committed Nov 18, 2024
1 parent 19b0860 commit 1216897
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions gui/src/spinbox_a.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ SpinBoxA::SpinBoxA(QWidget *parent)
connect(ui->SBA_DownButton, SIGNAL(clicked()), SLOT(onDownButtonPressed()));
int size = Style::getDimension(json::global::unit_3);

Style::setStyle(ui->SBA_Combobox, style::properties::widget::noBorder);

ui->SBA_UpButton->setIcon(
Style::getPixmap(":/gui/icons/plus.svg", Style::getColor(json::theme::content_inverse)));
Style::setStyle(ui->SBA_UpButton, style::properties::button::spinboxButton, true, true);
Expand Down
2 changes: 1 addition & 1 deletion gui/src/stylehelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ void StyleHelper::MenuControlButton(QPushButton *btn, QString objectName, bool c

void StyleHelper::MenuControlWidget(QWidget *w, QColor color, QString objectName)
{
QString style = "scopy--MenuControlButton {background-color: &&background_primary&&; border-radius: 4px;}"
QString style = "scopy--MenuControlButton {background-color: &&background_primary&&;}"
"scopy--MenuControlButton[selected=true] { background-color:&&colorname&&;}";
style.replace("&&colorname&&", color.name());
style.replace("&&background_primary&&", StyleHelper::getColor("background_primary"));
Expand Down
1 change: 1 addition & 0 deletions gui/src/widgets/menuspinbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ void MenuSpinbox::layoutVertically(bool left)
}

Style::setStyle(m_label, style::properties::label::subtle);
Style::setStyle(m_scaleCb, style::properties::widget::noBorder);

int size = Style::getDimension(json::global::unit_2_5);
m_plus->setIcon(Style::getPixmap(":/gui/icons/plus.svg", Style::getColor(json::theme::content_inverse)));
Expand Down
2 changes: 1 addition & 1 deletion gui/style/json/Scopy.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"svg_arrow_down": ":/gui/icons/handle_down_arrow_dark.svg",
"sba_cmb_box_arrow_right": ":/gui/icons/scopy-default/icons/sba_cmb_box_arrow_right.svg",
"sba_cmb_box_arrow": ":/gui/icons/scopy-default/icons/sba_cmb_box_arrow.svg",
"font_family": "Open Sans",
"font_family": "Arial",
"radius_1": "2",
"radius_2": "6",
"padding_1": "6",
Expand Down
3 changes: 3 additions & 0 deletions gui/style/qss/properties/widget/noBorder.qss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*[&&property&&=true] {
border: none;
}
1 change: 0 additions & 1 deletion plugins/test/src/styletool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ QWidget *StyleTool::buildStylePage()
Style::setStyle(layout->itemAt(i++)->widget()->layout()->itemAt(1)->widget(),
style::properties::label::menuMedium, true, true);


// Set the layout to the container widget
containerWidget->setLayout(layout);

Expand Down

0 comments on commit 1216897

Please sign in to comment.