Skip to content

Commit f6b4a2b

Browse files
gui/docking: Add spacing for title
Signed-off-by: Andrei-Fabian-Pop <[email protected]>
1 parent f4a54ff commit f6b4a2b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

gui/src/docking/dockwrapperkdab.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ DockWrapper::DockWrapper(QString name, QWidget *parent)
4040
: KDDockWidgets::QtWidgets::DockWidget(name + QString::number(s_dockWrapperId++),
4141
KDDockWidgets::DockWidgetOption_NotClosable)
4242
{
43-
this->setTitle(name); // Not unique name
43+
this->setTitle(" " + name); // Not unique name. Starts with space to ensure the title is shown
4444
// HACKISH: This connect is required as the DockWrapper cannot be closed (hidden) until it is
4545
// added to a layout (and gets a parent). So any call to setActivated has not effect. This is
4646
// just to propagate the effect set before the layouting.

plugins/pqm/src/waveforminstrument.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121

2222
#include "waveforminstrument.h"
23+
#include "dockableareainterface.h"
2324
#include "plotaxis.h"
2425
#include "plottingstrategybuilder.h"
2526
#include <QDate>
@@ -82,14 +83,14 @@ WaveformInstrument::WaveformInstrument(ToolMenuEntry *tme, QString uri, QWidget
8283
initPlot(m_voltagePlot, "V", -400, 400);
8384
setupChannels(m_voltagePlot, m_chnls["voltage"]);
8485
m_voltageDockWrapper->setInnerWidget(m_voltagePlot);
85-
m_dockableArea->addDockWrapper(m_voltageDockWrapper);
86+
m_dockableArea->addDockWrapper(m_voltageDockWrapper, DockableAreaInterface::Direction_TOP);
8687

8788
m_currentDockWrapper = createDockWrapper("Current Plot");
8889
m_currentPlot = new PlotWidget(dockableAreaWidget);
8990
initPlot(m_currentPlot, "A", -20, 20);
9091
setupChannels(m_currentPlot, m_chnls["current"]);
9192
m_currentDockWrapper->setInnerWidget(m_currentPlot);
92-
m_dockableArea->addDockWrapper(m_currentDockWrapper);
93+
m_dockableArea->addDockWrapper(m_currentDockWrapper, DockableAreaInterface::Direction_BOTTOM);
9394

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

0 commit comments

Comments
 (0)