Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
d3e413fb
Commit
d3e413fb
authored
Oct 08, 2019
by
Christoph Cullmann
🐮
Browse files
try to avoid nested layouts that we don't need
CCBUG: 412721
parent
8540d393
Changes
1
Show whitespace changes
Inline
Side-by-side
addons/filetree/katefiletreeplugin.cpp
View file @
d3e413fb
...
...
@@ -40,7 +40,6 @@
#include <QAction>
#include <QApplication>
#include <QStyle>
#include <QVBoxLayout>
#include "katefiletreedebug.h"
...
...
@@ -134,11 +133,6 @@ KateFileTreePluginView::KateFileTreePluginView(KTextEditor::MainWindow *mainWind
m_toolView
=
mainWindow
->
createToolView
(
plug
,
QStringLiteral
(
"kate_private_plugin_katefiletreeplugin"
),
KTextEditor
::
MainWindow
::
Left
,
QIcon
::
fromTheme
(
QStringLiteral
(
"document-open"
)),
i18n
(
"Documents"
));
Q_ASSERT
(
m_toolView
->
layout
());
m_toolView
->
layout
()
->
setContentsMargins
(
0
,
0
,
0
,
0
);
m_toolView
->
layout
()
->
setSpacing
(
0
);
auto
mainLayout
=
m_toolView
->
layout
();
// create toolbar
m_toolbar
=
new
KToolBar
(
m_toolView
);
m_toolbar
->
setMovable
(
false
);
...
...
@@ -150,12 +144,9 @@ KateFileTreePluginView::KateFileTreePluginView(KTextEditor::MainWindow *mainWind
const
int
iconSize
=
m_toolView
->
style
()
->
pixelMetric
(
QStyle
::
PM_ButtonIconSize
,
nullptr
,
m_toolView
);
m_toolbar
->
setIconSize
(
QSize
(
iconSize
,
iconSize
));
mainLayout
->
addWidget
(
m_toolbar
);
// create filetree
m_fileTree
=
new
KateFileTree
(
m_toolView
);
m_fileTree
->
setSortingEnabled
(
true
);
mainLayout
->
addWidget
(
m_fileTree
);
connect
(
m_fileTree
,
&
KateFileTree
::
activateDocument
,
this
,
&
KateFileTreePluginView
::
activateDocument
);
connect
(
m_fileTree
,
&
KateFileTree
::
viewModeChanged
,
this
,
&
KateFileTreePluginView
::
viewModeChanged
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment