Commit 2af20722 authored by Dominik Haumann's avatar Dominik Haumann Committed by Nicolás Alvarez
Browse files

Documents toolview: Remove margins in toolbar

With this patch, the toolbar of the Document's toolview has the
same height as the navbar. With KToolBar, this was unfortunately
not possible, since it seems KToolbar always adds a top margin,
this seems a bug in KToolBar.

Still, with QToolBar, no functionality should be lost.
parent b08003ff
Pipeline #137384 passed with stage
in 6 minutes and 11 seconds
......@@ -20,14 +20,15 @@
#include <KConfigGroup>
#include <KLocalizedString>
#include <KPluginFactory>
#include <KToolBar>
#include <KXMLGUIFactory>
#include <KXmlGuiWindow>
#include <QAction>
#include <QApplication>
#include <QLayout>
#include <QLineEdit>
#include <QStyle>
#include <QToolBar>
#include "katefiletreedebug.h"
......@@ -136,10 +137,11 @@ KateFileTreePluginView::KateFileTreePluginView(KTextEditor::MainWindow *mainWind
i18n("Documents"));
// create toolbar
m_toolbar = new KToolBar(m_toolView);
m_toolbar = new QToolBar(m_toolView);
m_toolbar->setMovable(false);
m_toolbar->setToolButtonStyle(Qt::ToolButtonIconOnly);
m_toolbar->setContextMenuPolicy(Qt::NoContextMenu);
m_toolbar->layout()->setContentsMargins(0, 0, 0, 0);
// ensure reasonable icons sizes, like e.g. the quick-open and co. icons
// the normal toolbar sizes are TOO large, e.g. for scaled stuff even more!
......
......@@ -21,7 +21,7 @@
#include <KXMLGUIClient>
class KToolBar;
class QToolBar;
class KateFileTree;
class KateFileTreeModel;
......@@ -111,7 +111,7 @@ protected:
private:
QWidget *m_toolView;
KToolBar *m_toolbar;
QToolBar *m_toolbar;
KateFileTree *m_fileTree;
KateFileTreeProxyModel *m_proxyModel;
QLineEdit *m_filter;
......
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