Skip to content

Commit

Permalink
gui/docking: Add spacing for title
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 22, 2025
1 parent f4a54ff commit f6b4a2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gui/src/docking/dockwrapperkdab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ DockWrapper::DockWrapper(QString name, QWidget *parent)
: KDDockWidgets::QtWidgets::DockWidget(name + QString::number(s_dockWrapperId++),
KDDockWidgets::DockWidgetOption_NotClosable)
{
this->setTitle(name); // Not unique name
this->setTitle(" " + name); // Not unique name. Starts with space to ensure the title is shown
// HACKISH: This connect is required as the DockWrapper cannot be closed (hidden) until it is
// added to a layout (and gets a parent). So any call to setActivated has not effect. This is
// just to propagate the effect set before the layouting.
Expand Down
5 changes: 3 additions & 2 deletions plugins/pqm/src/waveforminstrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

#include "waveforminstrument.h"
#include "dockableareainterface.h"
#include "plotaxis.h"
#include "plottingstrategybuilder.h"
#include <QDate>
Expand Down Expand Up @@ -82,14 +83,14 @@ WaveformInstrument::WaveformInstrument(ToolMenuEntry *tme, QString uri, QWidget
initPlot(m_voltagePlot, "V", -400, 400);
setupChannels(m_voltagePlot, m_chnls["voltage"]);
m_voltageDockWrapper->setInnerWidget(m_voltagePlot);
m_dockableArea->addDockWrapper(m_voltageDockWrapper);
m_dockableArea->addDockWrapper(m_voltageDockWrapper, DockableAreaInterface::Direction_TOP);

m_currentDockWrapper = createDockWrapper("Current Plot");
m_currentPlot = new PlotWidget(dockableAreaWidget);
initPlot(m_currentPlot, "A", -20, 20);
setupChannels(m_currentPlot, m_chnls["current"]);
m_currentDockWrapper->setInnerWidget(m_currentPlot);
m_dockableArea->addDockWrapper(m_currentDockWrapper);
m_dockableArea->addDockWrapper(m_currentDockWrapper, DockableAreaInterface::Direction_BOTTOM);

PlotNavigator::syncPlotNavigators(m_voltagePlot->navigator(), m_currentPlot->navigator(),
new QSet<QwtAxisId>{m_voltagePlot->xAxis()->axisId()});
Expand Down

0 comments on commit f6b4a2b

Please sign in to comment.