diff --git a/gui/src/stylehelper.cpp b/gui/src/stylehelper.cpp index f1175337c..a2d3677f1 100644 --- a/gui/src/stylehelper.cpp +++ b/gui/src/stylehelper.cpp @@ -55,6 +55,7 @@ void StyleHelper::initColorMap() sh->colorMap.insert("WarningText", "#FFC904"); sh->colorMap.insert("GrayText", Style::getAttribute(json::theme::interactive_subtle_idle)); sh->colorMap.insert("SH_focus", Style::getAttribute(json::theme::content_inverse)); + sh->colorMap.insert("stuff", Style::getAttribute(json::theme::background_subtle)); } QString StyleHelper::getChannelColor(int index) @@ -1039,7 +1040,7 @@ void StyleHelper::MenuCollapseHeaderLineEdit(QLineEdit *w, QString objectName) QLineEdit { color: white; background-color: rgba(255,255,255,0); - font-weight: 500; + font-weight: 800; font-family: Open Sans; font-size: 14px; font-style: normal; @@ -1140,7 +1141,7 @@ void StyleHelper::HoverWidget(QWidget *w, bool draggable, QString objectName) if(draggable) { style.replace("&&Background&&", StyleHelper::getColor("UIElementBackground")); - style.replace("&&HoverBackground&&", StyleHelper::getColor("UIElementHighlight")); + style.replace("&&HoverBackground&&", StyleHelper::getColor("stuff")); } else { style.replace("&&Background&&", "transparent"); style.replace("&&HoverBackground&&", "transparent"); diff --git a/gui/src/widgets/cursorsettings.cpp b/gui/src/widgets/cursorsettings.cpp index b734147bb..8b86e1c6e 100644 --- a/gui/src/widgets/cursorsettings.cpp +++ b/gui/src/widgets/cursorsettings.cpp @@ -1,4 +1,5 @@ #include +#include #include #include @@ -26,6 +27,7 @@ void CursorSettings::initUI() // x controls xControls = new MenuSectionWidget(this); + Style::setStyle(xControls, style::properties::widget::border); layout->addWidget(xControls); xControls->contentLayout()->setSpacing(10); @@ -39,6 +41,7 @@ void CursorSettings::initUI() // y controls yControls = new MenuSectionWidget(this); + Style::setStyle(yControls, style::properties::widget::border); layout->addWidget(yControls); yControls->contentLayout()->setSpacing(10); @@ -50,6 +53,7 @@ void CursorSettings::initUI() // readouts controls readoutsControls = new MenuSectionWidget(this); + Style::setStyle(readoutsControls, style::properties::widget::border); layout->addWidget(readoutsControls); readoutsDrag = new MenuOnOffSwitch(tr("Move readouts"), readoutsControls, false); diff --git a/gui/src/widgets/measurementpanel.cpp b/gui/src/widgets/measurementpanel.cpp index 47be6801e..5220dac2e 100644 --- a/gui/src/widgets/measurementpanel.cpp +++ b/gui/src/widgets/measurementpanel.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include @@ -60,6 +61,8 @@ MeasurementsPanel::MeasurementsPanel(QWidget *parent) int idx = panelLayout->indexOf(spacer); m_stacks.append(new VerticalWidgetStack(stackSize, this)); panelLayout->insertWidget(idx, m_stacks.last()); + + setStyleSheet("background-color: " + Style::getAttribute(json::theme::background_subtle)); } void MeasurementsPanel::addWidget(QWidget *meas) @@ -208,6 +211,7 @@ StatsPanel::StatsPanel(QWidget *parent) panelLayout->setAlignment(Qt::AlignLeft); lay->addWidget(scrollArea); + setStyleSheet("background-color: " + Style::getAttribute(json::theme::background_subtle)); } StatsPanel::~StatsPanel() {} diff --git a/gui/src/widgets/measurementsettings.cpp b/gui/src/widgets/measurementsettings.cpp index 20df31cdf..4a155e4b7 100644 --- a/gui/src/widgets/measurementsettings.cpp +++ b/gui/src/widgets/measurementsettings.cpp @@ -2,6 +2,7 @@ #include #include +#include using namespace scopy; @@ -14,6 +15,7 @@ MeasurementSettings::MeasurementSettings(QWidget *parent) lay->setMargin(0); measureSection = new MenuSectionWidget(this); + Style::setStyle(measureSection, style::properties::widget::border); measurePanelSwitch = new MenuOnOffSwitch("Measure Panel", this); measurePanelSwitch->onOffswitch()->setChecked(true); QHBoxLayout *hlay1 = new QHBoxLayout(); @@ -74,6 +76,7 @@ MeasurementSettings::MeasurementSettings(QWidget *parent) hlay2->addWidget(measureSortByType); statsSection = new MenuSectionWidget(this); + Style::setStyle(statsSection, style::properties::widget::border); statsPanelSwitch = new MenuOnOffSwitch("Stats Panel", this); connect(statsPanelSwitch->onOffswitch(), &QAbstractButton::toggled, this, [=](bool b) { Q_EMIT enableStatsPanel(b); }); @@ -139,6 +142,7 @@ MeasurementSettings::MeasurementSettings(QWidget *parent) hlay4->addWidget(statsSortByType); markerSection = new MenuSectionWidget(this); + Style::setStyle(markerSection, style::properties::widget::border); markerPanelSwitch = new MenuOnOffSwitch("Marker Panel", this); connect(markerPanelSwitch->onOffswitch(), &QAbstractButton::toggled, this, [=](bool b) { Q_EMIT enableMarkerPanel(b); }); diff --git a/gui/src/widgets/menucollapsesection.cpp b/gui/src/widgets/menucollapsesection.cpp index 423a244d9..8622951e7 100644 --- a/gui/src/widgets/menucollapsesection.cpp +++ b/gui/src/widgets/menucollapsesection.cpp @@ -80,7 +80,7 @@ MenuCollapseSection::MenuCollapseSection(QString title, MenuCollapseSection::Men m_contLayout = new QVBoxLayout(container); container->setLayout(m_contLayout); m_contLayout->setMargin(0); - m_contLayout->setSpacing(0); + m_contLayout->setSpacing(10); connect(m_header, &QAbstractButton::toggled, container, &QWidget::setVisible); } diff --git a/gui/src/widgets/menuspinbox.cpp b/gui/src/widgets/menuspinbox.cpp index b7994cc5e..4e892bd1a 100644 --- a/gui/src/widgets/menuspinbox.cpp +++ b/gui/src/widgets/menuspinbox.cpp @@ -1,4 +1,5 @@ #include "menuspinbox.h" +#include #include namespace scopy { @@ -12,8 +13,8 @@ MenuSpinbox::MenuSpinbox(QString name, double val, QString unit, double min, dou m_label = new QLabel(name, parent); m_edit = new QLineEdit("0", parent); m_scaleCb = new QComboBox(parent); - m_plus = new QPushButton("+", parent); - m_minus = new QPushButton("-", parent); + m_plus = new QPushButton(parent); + m_minus = new QPushButton(parent); m_plus->setAutoRepeat(true); m_plus->setAutoRepeatDelay(300); @@ -90,7 +91,6 @@ void MenuSpinbox::layoutVertically(bool left) line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Plain); editLay->addWidget(line); - StyleHelper::MenuSpinboxLine(line); editLay->addWidget(m_scaleCb); if(left) { @@ -101,14 +101,16 @@ void MenuSpinbox::layoutVertically(bool left) lay->addLayout(btnLay); } - StyleHelper::MenuSpinboxLabel(m_label); - StyleHelper::MenuSpinboxLineEdit(m_edit); - StyleHelper::MenuSpinComboBox(m_scaleCb); + int size = Style::getDimension(json::global::unit_3); + m_plus->setIcon( + Style::getPixmap(":/gui/icons/plus.svg", Style::getColor(json::theme::content_inverse))); + Style::setStyle(m_plus, style::properties::button::basicButton); + m_plus->setFixedSize(size, size); - StyleHelper::SpinBoxUpButton(m_plus, "plus_btn"); - m_plus->setFixedSize(30, 30); - StyleHelper::SpinBoxDownButton(m_minus, "minus_btn"); - m_minus->setFixedSize(30, 30); + m_minus->setIcon( + Style::getPixmap(":/gui/icons/minus.svg", Style::getColor(json::theme::content_inverse))); + Style::setStyle(m_minus, style::properties::button::basicButton); + m_minus->setFixedSize(size, size); } void MenuSpinbox::layoutHorizontally(bool left) @@ -147,14 +149,16 @@ void MenuSpinbox::layoutHorizontally(bool left) lay->addLayout(btnLay); } - StyleHelper::MenuSmallLabel(m_label); - StyleHelper::MenuLineEdit(m_edit); - StyleHelper::MenuComboBox(m_scaleCb); + int size = Style::getDimension(json::global::unit_3); + m_plus->setIcon( + Style::getPixmap(":/gui/icons/plus.svg", Style::getColor(json::theme::content_inverse))); + Style::setStyle(m_plus, style::properties::button::basicButton); + m_plus->setFixedSize(size, size); - StyleHelper::SpinBoxUpButton(m_plus, "plus_btn"); - m_plus->setFixedSize(30, 30); - StyleHelper::SpinBoxDownButton(m_minus, "minus_btn"); - m_minus->setFixedSize(30, 30); + m_minus->setIcon( + Style::getPixmap(":/gui/icons/minus.svg", Style::getColor(json::theme::content_inverse))); + Style::setStyle(m_minus, style::properties::button::basicButton); + m_minus->setFixedSize(size, size); } double MenuSpinbox::value() const { return m_value; } diff --git a/gui/style/qss/generic/global.qss b/gui/style/qss/generic/global.qss index 389acf256..0b3108526 100644 --- a/gui/style/qss/generic/global.qss +++ b/gui/style/qss/generic/global.qss @@ -4,6 +4,7 @@ color: &content_default&; font-family: Arial, sans-serif; font-size: &font_size&; + font-weight: 400; } *:focus { diff --git a/plugins/adc/src/measurecomponent.cpp b/plugins/adc/src/measurecomponent.cpp index b999d41b7..058a130a3 100644 --- a/plugins/adc/src/measurecomponent.cpp +++ b/plugins/adc/src/measurecomponent.cpp @@ -19,6 +19,7 @@ MeasureComponent::MeasureComponent(ToolTemplate *tool, MeasurementPanelInterface measurePanelManagerHover->setContent(m_measureSettings); measurePanelManagerHover->setAnchorPos(HoverPosition::HP_TOPRIGHT); measurePanelManagerHover->setContentPos(HoverPosition::HP_TOPLEFT); + measurePanelManagerHover->setAnchorOffset(QPoint(0, -10)); connect(measure->button(), &QPushButton::toggled, this, [=](bool b) { measurePanelManagerHover->setVisible(b); measurePanelManagerHover->raise();