diff --git a/core/src/detachedtoolwindow.cpp b/core/src/detachedtoolwindow.cpp index 8f3698c964..a46ac4186b 100644 --- a/core/src/detachedtoolwindow.cpp +++ b/core/src/detachedtoolwindow.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -46,6 +47,7 @@ DetachedToolWindow::DetachedToolWindow(QWidget *parent, ToolMenuEntry *tme) lay->addWidget(w); loadToolGeometry(tme, this); + Style::setBackgroundColor(this, json::theme::background_primary, true); tme->tool()->show(); show(); } diff --git a/gui/src/plotwidget.cpp b/gui/src/plotwidget.cpp index 301eff1fc8..5dd81cee80 100644 --- a/gui/src/plotwidget.cpp +++ b/gui/src/plotwidget.cpp @@ -78,7 +78,7 @@ PlotWidget::PlotWidget(QWidget *parent) setupPlotButtonManager(); m_plot->canvas()->installEventFilter(this); - Style::setBackgroundColor(m_plot, "transparent"); + Style::setBackgroundColor(m_plot, QString("transparent")); Style::setBackgroundColor(m_plot->canvas(), json::theme::background_plot, true); } diff --git a/gui/src/tooltemplate.cpp b/gui/src/tooltemplate.cpp index 4249180fb2..8f991db261 100644 --- a/gui/src/tooltemplate.cpp +++ b/gui/src/tooltemplate.cpp @@ -52,7 +52,7 @@ ToolTemplate::ToolTemplate(QWidget *parent) m_rightStack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); m_topStack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); m_bottomStack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - Style::setBackgroundColor(m_ui->leftContainer, "transparent"); + Style::setBackgroundColor(m_ui->leftContainer, QString("transparent")); Style::setBackgroundColor(m_ui->topContainerMenuControl, json::theme::background_primary); } diff --git a/gui/src/widgets/hoverwidget.cpp b/gui/src/widgets/hoverwidget.cpp index 723d811ca7..f9fe1c4eeb 100644 --- a/gui/src/widgets/hoverwidget.cpp +++ b/gui/src/widgets/hoverwidget.cpp @@ -39,7 +39,7 @@ HoverWidget::HoverWidget(QWidget *content, QWidget *anchor, QWidget *parent) , m_relative(false) , m_relativeOffset(nullptr) { - Style::setBackgroundColor(this, json::theme::background_primary); + Style::setBackgroundColor(this, QString("transparent"), true); m_lay = new QHBoxLayout(this); m_lay->setSizeConstraint(QLayout::SetFixedSize); m_lay->setContentsMargins(0, 0, 0, 0); diff --git a/gui/src/widgets/menulineedit.cpp b/gui/src/widgets/menulineedit.cpp index e562f57659..1dd943f52a 100644 --- a/gui/src/widgets/menulineedit.cpp +++ b/gui/src/widgets/menulineedit.cpp @@ -46,7 +46,7 @@ QLineEdit *MenuLineEdit::edit() { return m_edit; } void MenuLineEdit::applyStylesheet() { Style::setStyle(m_edit, style::properties::lineedit::menuLineEdit); - Style::setBackgroundColor(this, "transparent"); + Style::setBackgroundColor(this, QString("transparent")); } #include "moc_menulineedit.cpp" diff --git a/gui/src/widgets/plotinfo.cpp b/gui/src/widgets/plotinfo.cpp index eafaf26e23..3b52292a95 100644 --- a/gui/src/widgets/plotinfo.cpp +++ b/gui/src/widgets/plotinfo.cpp @@ -74,7 +74,6 @@ void PlotInfo::addCustomInfo(QWidget *info, InfoPosition hpos, InfoPosition vpos QLabel *PlotInfo::addLabelInfo(InfoPosition hpos, InfoPosition vpos) { QLabel *label = new QLabel(); - Style::setStyle(label, style::properties::label::plotInfo, true, true); addCustomInfo(label, hpos, vpos); return label; diff --git a/gui/src/widgets/plotinfowidgets.cpp b/gui/src/widgets/plotinfowidgets.cpp index db5d5e2032..b4aaa6ac8a 100644 --- a/gui/src/widgets/plotinfowidgets.cpp +++ b/gui/src/widgets/plotinfowidgets.cpp @@ -34,7 +34,6 @@ HDivInfo::HDivInfo(PlotWidget *plot, QWidget *parent) : m_mpf(new MetricPrefixFormatter(this)) , m_plot(plot) { - Style::setStyle(this, style::properties::label::plotInfo, true, true); m_mpf->setTrimZeroes(true); m_mpf->setTwoDecimalMode(false); connect(m_plot->navigator(), &PlotNavigator::rectChanged, this, &HDivInfo::onRectChanged); @@ -76,7 +75,6 @@ void HDivInfo::update(double val, bool zoomed) TimeSamplingInfo::TimeSamplingInfo(QWidget *parent) : m_mpf(new MetricPrefixFormatter(this)) { - Style::setStyle(this, style::properties::label::plotInfo, true, true); m_mpf->setTrimZeroes(true); m_mpf->setTwoDecimalMode(false); } @@ -99,7 +97,6 @@ void TimeSamplingInfo::update(SamplingInfo info) FFTSamplingInfo::FFTSamplingInfo(QWidget *parent) : m_mpf(new MetricPrefixFormatter(this)) { - Style::setStyle(this, style::properties::label::plotInfo, true, true); m_mpf->setTrimZeroes(true); m_mpf->setTwoDecimalMode(false); } @@ -127,7 +124,6 @@ FPSInfo::FPSInfo(PlotWidget *plot, QWidget *parent) , m_lastTimeStamp(0) , m_avgSize(10) { - Style::setStyle(this, style::properties::label::plotInfo, true, true); setVisible(Preferences::GetInstance()->get("general_show_plot_fps").toBool()); connect(m_plot, &PlotWidget::newData, this, [=]() { update(QDateTime::currentMSecsSinceEpoch()); }); @@ -165,7 +161,6 @@ void FPSInfo::update(qint64 timestamp) TimestampInfo::TimestampInfo(PlotWidget *plot, QWidget *parent) { - Style::setStyle(this, style::properties::label::plotInfo, true, true); connect(plot, &PlotWidget::newData, this, [=]() { setText(QDateTime::currentDateTime().time().toString("hh:mm:ss")); }); } diff --git a/gui/style/qss/generic/m2k.qss b/gui/style/qss/generic/m2k.qss index 703ac4c0a0..d00fa836d0 100644 --- a/gui/style/qss/generic/m2k.qss +++ b/gui/style/qss/generic/m2k.qss @@ -395,7 +395,7 @@ QPushButton[tool_launcher_custom_widget="true"] { border: none; background-color: none; } -.QWidget[tool_launcher_custom_widget="true"]:hover { +QWidget[tool_launcher_custom_widget="true"]:hover { background-color: #3C&color_inverse_hexcode&; border: 1px solid #1E&color_inverse_hexcode&; border-radius: 5px; @@ -421,25 +421,25 @@ QWidget#stackedWidgetPage1 { border-radius: 12px; background-color: &background_subtle&; } -.scopy--m2k--StackedHomepage#stackedWidget { +scopy--m2k--StackedHomepage#stackedWidget { background-color: &background_subtle&; } QFrame[line_separator="true"] { background-color: #13&color_default_hexcode&; } -.scopy--m2k--PowerController #leftPanel, -.scopy--m2k--DMM #leftPanel { +scopy--m2k--PowerController #leftPanel, +scopy--m2k--DMM #leftPanel { background-color: #28&color_inverse_hexcode&; } -.scopy--m2k--Oscilloscope #mainWidget, -.scopy--m2k--SpectrumAnalyzer #mainWidget, -.scopy--m2k--NetworkAnalyzer #mainWidget, -.scopy--m2k--SignalGenerator #mainWidget, -.scopy--m2k--logic--LogicAnalyzer #mainWidget, -.scopy--m2k--logic--PatternGenerator #mainWidget, -.scopy--m2k--DigitalIO #widget, -.scopy--m2k--DMM #hLayout_top_btn_area_voltmeter, -.scopy--m2k--PowerController #hWidget_top_area { +scopy--m2k--Oscilloscope #mainWidget, +scopy--m2k--SpectrumAnalyzer #mainWidget, +scopy--m2k--NetworkAnalyzer #mainWidget, +scopy--m2k--SignalGenerator #mainWidget, +scopy--m2k--logic--LogicAnalyzer #mainWidget, +scopy--m2k--logic--PatternGenerator #mainWidget, +scopy--m2k--DigitalIO #widget, +scopy--m2k--DMM #hLayout_top_btn_area_voltmeter, +scopy--m2k--PowerController #hWidget_top_area { background-color: qlineargradient( spread: pad, x1: 0, @@ -451,8 +451,8 @@ QFrame[line_separator="true"] { stop: 1 transparent ); } -.scopy--m2k--ExportSettings #mainWidget, -.scopy--m2k--ImportSettings #mainWidget { +scopy--m2k--ExportSettings #mainWidget, +scopy--m2k--ImportSettings #mainWidget { background-color: none; } scopy--CursorReadouts { @@ -530,7 +530,7 @@ scopy--ChannelWidget QWidget#widget { scopy--ChannelWidget QWidget#widget[selected="true"] { background-color: #40&color_inverse_hexcode&; } -.scopy--ChannelWidget QWidget#widget::hover { +scopy--ChannelWidget QWidget#widget::hover { background-color: #20&color_inverse_hexcode&; font-weight: bold; border-bottom: 0px solid none; diff --git a/gui/style/qss/properties/label/plotInfo.qss b/gui/style/qss/properties/label/plotInfo.qss deleted file mode 100644 index 9774cc54a0..0000000000 --- a/gui/style/qss/properties/label/plotInfo.qss +++ /dev/null @@ -1,4 +0,0 @@ -QWidget[&&property&&=true] { - font-weight: 400; - font-size: 12px; -} diff --git a/plugins/debugger/src/iioexplorer/iioexplorerinstrument.cpp b/plugins/debugger/src/iioexplorer/iioexplorerinstrument.cpp index 5048bf3555..97b3b75d1a 100644 --- a/plugins/debugger/src/iioexplorer/iioexplorerinstrument.cpp +++ b/plugins/debugger/src/iioexplorer/iioexplorerinstrument.cpp @@ -89,7 +89,7 @@ void IIOExplorerInstrument::setupUi() StyleHelper::SplitterStyle(m_VSplitter, "VerticalSplitter"); m_mainWidget->setLayout(new QVBoxLayout(m_mainWidget)); - m_mainWidget->layout()->setContentsMargins(10, 10, 10, 10); + m_mainWidget->layout()->setContentsMargins(0, 0, 0, 0); bottom_container->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); bottom_container->setLayout(new QHBoxLayout(bottom_container)); diff --git a/plugins/pqm/src/harmonicsinstrument.cpp b/plugins/pqm/src/harmonicsinstrument.cpp index 36fc2cf0ff..76ea5d15c0 100644 --- a/plugins/pqm/src/harmonicsinstrument.cpp +++ b/plugins/pqm/src/harmonicsinstrument.cpp @@ -47,6 +47,7 @@ HarmonicsInstrument::HarmonicsInstrument(ToolMenuEntry *tme, QString uri, QWidge setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); QHBoxLayout *instrumentLayout = new QHBoxLayout(this); setLayout(instrumentLayout); + instrumentLayout->setMargin(0); StyleHelper::GetInstance()->initColorMap(); ToolTemplate *tool = new ToolTemplate(this); diff --git a/plugins/pqm/src/rmsinstrument.cpp b/plugins/pqm/src/rmsinstrument.cpp index 259b0f8d0e..c40a5df78c 100644 --- a/plugins/pqm/src/rmsinstrument.cpp +++ b/plugins/pqm/src/rmsinstrument.cpp @@ -46,6 +46,7 @@ RmsInstrument::RmsInstrument(ToolMenuEntry *tme, QString uri, QWidget *parent) setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); QHBoxLayout *instrumentLayout = new QHBoxLayout(this); setLayout(instrumentLayout); + instrumentLayout->setMargin(0); StyleHelper::GetInstance()->initColorMap(); ToolTemplate *tool = new ToolTemplate(this); diff --git a/plugins/pqm/src/settingsinstrument.cpp b/plugins/pqm/src/settingsinstrument.cpp index 200b890f86..ce0479faff 100644 --- a/plugins/pqm/src/settingsinstrument.cpp +++ b/plugins/pqm/src/settingsinstrument.cpp @@ -44,6 +44,7 @@ SettingsInstrument::SettingsInstrument(QWidget *parent) setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); QVBoxLayout *instrumentLayout = new QVBoxLayout(this); setLayout(instrumentLayout); + instrumentLayout->setMargin(0); ToolTemplate *tool = new ToolTemplate(this); tool->topContainer()->setVisible(false); diff --git a/plugins/pqm/src/waveforminstrument.cpp b/plugins/pqm/src/waveforminstrument.cpp index e0cadc25c4..cef56836fc 100644 --- a/plugins/pqm/src/waveforminstrument.cpp +++ b/plugins/pqm/src/waveforminstrument.cpp @@ -51,6 +51,7 @@ WaveformInstrument::WaveformInstrument(ToolMenuEntry *tme, QString uri, QWidget setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); QHBoxLayout *layout = new QHBoxLayout(this); setLayout(layout); + layout->setMargin(0); StyleHelper::GetInstance()->initColorMap(); m_plottingStrategy = PlottingStrategyBuilder::build("trigger", m_plotSampleRate); diff --git a/plugins/test/src/styletool.cpp b/plugins/test/src/styletool.cpp index 2943e2b20e..f47bf65c4a 100644 --- a/plugins/test/src/styletool.cpp +++ b/plugins/test/src/styletool.cpp @@ -149,7 +149,6 @@ QWidget *StyleTool::buildStylePage() addLabeledWidget("Menu Small Label", new QLabel("Menu Small Label")); addLabeledWidget("Subtle Label", new QLabel("Subtle Label")); addLabeledWidget("Menu Medium Label", new QLabel("Menu Medium Label")); - addLabeledWidget("Plot Info Label", new QLabel("Plot Info Label")); // Style the labels Style::setStyle(layout->itemAt(i++)->widget()->layout()->itemAt(1)->widget(), @@ -158,8 +157,7 @@ QWidget *StyleTool::buildStylePage() true, true); Style::setStyle(layout->itemAt(i++)->widget()->layout()->itemAt(1)->widget(), style::properties::label::menuMedium, true, true); - Style::setStyle(layout->itemAt(i++)->widget()->layout()->itemAt(1)->widget(), - style::properties::label::plotInfo, true, true); + // Set the layout to the container widget containerWidget->setLayout(layout);