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
56a17549
Commit
56a17549
authored
Feb 26, 2022
by
Christoph Cullmann
🐮
Browse files
bottom bar spans full window width
parent
6e689583
Pipeline
#143071
passed with stage
in 5 minutes and 10 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
kate/katemdi.cpp
View file @
56a17549
...
...
@@ -878,13 +878,20 @@ MainWindow::MainWindow(QWidget *parentWidget)
:
KParts
::
MainWindow
(
parentWidget
,
Qt
::
Window
)
,
m_guiClient
(
new
GUIClient
(
this
))
{
//
init the internal widgets
//
central frame for all stuff
QFrame
*
hb
=
new
QFrame
(
this
);
QHBoxLayout
*
hlayout
=
new
QHBoxLayout
(
hb
);
setCentralWidget
(
hb
);
// top level vbox for all stuff + bottom bar
QVBoxLayout
*
toplevelVBox
=
new
QVBoxLayout
(
hb
);
toplevelVBox
->
setContentsMargins
(
0
,
0
,
0
,
0
);
toplevelVBox
->
setSpacing
(
0
);
// hbox for all splitters and other side bars
QHBoxLayout
*
hlayout
=
new
QHBoxLayout
;
hlayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
hlayout
->
setSpacing
(
0
);
setCentralWidget
(
hb
);
toplevelVBox
->
addLayout
(
hlayout
);
m_sidebars
[
KMultiTabBar
::
Left
]
=
std
::
make_unique
<
Sidebar
>
(
KMultiTabBar
::
Left
,
this
,
hb
);
hlayout
->
addWidget
(
m_sidebars
[
KMultiTabBar
::
Left
].
get
());
...
...
@@ -918,6 +925,11 @@ MainWindow::MainWindow(QWidget *parentWidget)
m_vSplitter
->
setCollapsible
(
m_vSplitter
->
indexOf
(
m_centralWidget
),
false
);
m_vSplitter
->
setStretchFactor
(
m_vSplitter
->
indexOf
(
m_centralWidget
),
1
);
m_sidebars
[
KMultiTabBar
::
Right
]
=
std
::
make_unique
<
Sidebar
>
(
KMultiTabBar
::
Right
,
this
,
hb
);
hlayout
->
addWidget
(
m_sidebars
[
KMultiTabBar
::
Right
].
get
());
m_sidebars
[
KMultiTabBar
::
Right
]
->
setSplitter
(
m_hSplitter
);
// bottom side bar spans full windows, include status bar, too
m_sidebars
[
KMultiTabBar
::
Bottom
]
=
std
::
make_unique
<
Sidebar
>
(
KMultiTabBar
::
Bottom
,
this
,
vb
);
auto
bottomHBoxLaout
=
new
QHBoxLayout
;
bottomHBoxLaout
->
addWidget
(
m_sidebars
[
KMultiTabBar
::
Bottom
].
get
());
...
...
@@ -925,13 +937,9 @@ MainWindow::MainWindow(QWidget *parentWidget)
m_statusBarStackedWidget
->
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Fixed
);
bottomHBoxLaout
->
addWidget
(
m_statusBarStackedWidget
);
bottomHBoxLaout
->
setStretch
(
0
,
100
);
vlayout
->
addLayout
(
bottomHBoxLaout
);
toplevelVBox
->
addLayout
(
bottomHBoxLaout
);
m_sidebars
[
KMultiTabBar
::
Bottom
]
->
setSplitter
(
m_vSplitter
);
m_sidebars
[
KMultiTabBar
::
Right
]
=
std
::
make_unique
<
Sidebar
>
(
KMultiTabBar
::
Right
,
this
,
hb
);
hlayout
->
addWidget
(
m_sidebars
[
KMultiTabBar
::
Right
].
get
());
m_sidebars
[
KMultiTabBar
::
Right
]
->
setSplitter
(
m_hSplitter
);
for
(
const
auto
&
sidebar
:
qAsConst
(
m_sidebars
))
{
connect
(
sidebar
.
get
(),
&
Sidebar
::
sigShowPluginConfigPage
,
this
,
&
MainWindow
::
sigShowPluginConfigPage
);
// all sidebar splitter handles are instantiated, so we can now safely call this
...
...
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