@@ -27,10 +27,10 @@ namespace scopy {
2727namespace gui {
2828
2929MenuSpinbox::MenuSpinbox (QString name, double val, QString unit, double min, double max, bool vertical, bool left,
30- QWidget *parent)
30+ bool large_widget, QWidget *parent)
3131 : QWidget(parent)
3232{
33-
33+ m_large_widget = large_widget;
3434 m_label = new QLabel (name, parent);
3535 m_edit = new QLineEdit (" 0" , parent);
3636 m_scaleCb = new QComboBox (parent);
@@ -121,17 +121,23 @@ void MenuSpinbox::layoutVertically(bool left)
121121 lay->addLayout (btnLay);
122122 }
123123
124- Style::setStyle (m_label, style::properties::label::subtle);
125124 Style::setStyle (m_scaleCb, style::properties::widget::noBorder);
125+ int size = m_large_widget ? Style::getDimension (json::global::unit_2_5)
126+ : Style::getDimension (json::global::unit_1);
126127
127- int size = Style::getDimension (json::global::unit_2_5);
128128 m_plus->setIcon (Style::getPixmap (" :/gui/icons/plus.svg" , Style::getColor (json::theme::content_inverse)));
129129 Style::setStyle (m_plus, style::properties::button::spinboxButton);
130130 m_plus->setFixedSize (size, size);
131131
132132 m_minus->setIcon (Style::getPixmap (" :/gui/icons/minus.svg" , Style::getColor (json::theme::content_inverse)));
133133 Style::setStyle (m_minus, style::properties::button::spinboxButton);
134134 m_minus->setFixedSize (size, size);
135+
136+ if (!m_large_widget) {
137+ int icon_size = Style::getDimension (json::global::unit_0_5);
138+ m_plus->setIconSize (QSize (icon_size, icon_size));
139+ m_minus->setIconSize (QSize (icon_size, icon_size));
140+ }
135141}
136142
137143void MenuSpinbox::layoutHorizontally (bool left)
0 commit comments