Commit 01ac6bbd authored by Boudewijn Rempt's avatar Boudewijn Rempt

Set a minimal label as the toolbox docker titlebar widget

This makes the minimal width of the toolbox 16 pixels, and makes
it possible to drag the toolbox out. It doesn't have close or
float buttons, though it's still possible to close the docker.

BUG:392615
parent b359d5c4
......@@ -22,8 +22,11 @@
#include "KoToolBoxDocker_p.h"
#include "KoToolBox_p.h"
#include "KoToolBoxScrollArea_p.h"
#include "KoDockRegistry.h"
#include <klocalizedstring.h>
#include <QLabel>
#include <QFontMetrics>
#include <QFrame>
KoToolBoxDocker::KoToolBoxDocker(KoToolBox *toolBox)
: QDockWidget(i18n("Toolbox"))
......@@ -33,6 +36,14 @@ KoToolBoxDocker::KoToolBoxDocker(KoToolBox *toolBox)
setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);
setWidget(m_scrollArea);
QLabel *w = new QLabel(" ", this);
w->setFrameShape(QFrame::StyledPanel);
w->setFrameShadow(QFrame::Raised);
w->setFrameStyle(QFrame::Panel | QFrame::Raised);
w->setMinimumWidth(16);
w->setFixedHeight(QFontMetrics(KoDockRegistry::dockFont()).height());
setTitleBarWidget(w);
connect(this, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)),
this, SLOT(updateToolBoxOrientation(Qt::DockWidgetArea)));
connect(this, SIGNAL(topLevelChanged(bool)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment