Skip to content

Commit

Permalink
gui/docking: Set default background color to DockableArea instances
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei-Fabian-Pop <[email protected]>
  • Loading branch information
Andrei-Fabian-Pop committed Jan 13, 2025
1 parent 4fd8516 commit 1ad34cc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
10 changes: 7 additions & 3 deletions plugins/adc/src/freq/fftplotcomponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@
#include "fftplotcomponent.h"
#include "plotaxis.h"

#include <gui/style.h>
#include <gui/style_attributes.h>
#include <gui/docking/dockablearea.h>
#include <gui/docking/dockwrapper.h>
#include <widgets/menucollapsesection.h>
#include <widgets/menusectionwidget.h>
#include <widgets/menuplotaxisrangecontrol.h>
#include <gui/widgets/menucollapsesection.h>
#include <gui/widgets/menusectionwidget.h>
#include <gui/widgets/menuplotaxisrangecontrol.h>

#include <pluginbase/preferences.h>
#include <qwt_point_data.h>
#include <QLineEdit>
Expand All @@ -40,6 +43,7 @@ FFTPlotComponent::FFTPlotComponent(QString name, uint32_t uuid, QWidget *parent)
{
m_dockableArea = createDockableArea(this);
QWidget *dockableAreaWidget = dynamic_cast<QWidget *>(m_dockableArea);
Style::setBackgroundColor(dockableAreaWidget, json::theme::background_subtle, true);
m_plotLayout->addWidget(dockableAreaWidget);

m_fftDockWrapper = createDockWrapper("FFT Plot");
Expand Down
4 changes: 4 additions & 0 deletions plugins/adc/src/time/timeplotcomponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
#include <gui/widgets/menusectionwidget.h>
#include <gui/widgets/menuplotaxisrangecontrol.h>
#include <gui/channelcomponent.h>
#include <gui/style.h>
#include <gui/style_attributes.h>

#include <pluginbase/preferences.h>
#include <timeplotcomponentchannel.h>
#include <qwt_point_data.h>
Expand All @@ -47,6 +50,7 @@ TimePlotComponent::TimePlotComponent(QString name, uint32_t uuid, QWidget *paren
{
m_dockableArea = createDockableArea(this);
QWidget *dockableAreaWidget = dynamic_cast<QWidget *>(m_dockableArea);
Style::setBackgroundColor(dockableAreaWidget, json::theme::background_subtle, true);
m_plotLayout->addWidget(dockableAreaWidget);

m_timeDockWidget = createDockWrapper("Time Plot");
Expand Down
1 change: 1 addition & 0 deletions plugins/pqm/src/waveforminstrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ WaveformInstrument::WaveformInstrument(ToolMenuEntry *tme, QString uri, QWidget
});

QWidget *dockableAreaWidget = dynamic_cast<QWidget *>(m_dockableArea);
Style::setBackgroundColor(dockableAreaWidget, json::theme::background_subtle, true);
tool->addWidgetToCentralContainerHelper(dockableAreaWidget);

m_voltageDockWrapper = createDockWrapper("Voltage Plot");
Expand Down

0 comments on commit 1ad34cc

Please sign in to comment.