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
Konsole
Commits
1cb6db73
Commit
1cb6db73
authored
Jun 03, 2021
by
Tomaz Canabrava
Browse files
Take in consideration the full size of the window
parent
71fbc94c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/widgets/ViewSplitter.cpp
View file @
1cb6db73
...
...
@@ -445,13 +445,14 @@ void Konsole::ViewSplitterHandle::mousePressEvent(QMouseEvent *ev)
continue
;
}
// We need to iterate untill one before the last element.
// we can't snap to the last.
auto
end
=
std
::
end
(
splitter
->
sizes
())
-
1
;
for
(
auto
it
=
std
::
begin
(
splitter
->
sizes
());
it
<
end
;
it
++
)
{
int
delta
=
0
;
for
(
auto
point
:
splitter
->
sizes
())
{
qDebug
()
<<
"Getting"
<<
point
;
delta
+=
point
;
QPoint
thisPoint
=
orientation
()
==
Qt
::
Horizontal
?
QPoint
(
*
it
,
0
)
:
QPoint
(
0
,
*
it
);
?
QPoint
(
delta
,
0
)
:
QPoint
(
0
,
delta
);
QPoint
splitterPos
=
splitter
->
mapToTopLevel
(
thisPoint
);
...
...
@@ -462,11 +463,12 @@ void Konsole::ViewSplitterHandle::mousePressEvent(QMouseEvent *ev)
allSplitterSizes
.
push_back
(
ourPos
);
}
}
std
::
sort
(
std
::
begin
(
allSplitterSizes
),
std
::
end
(
allSplitterSizes
));
qDebug
()
<<
"All splitter sizes:"
<<
allSplitterSizes
;
QPoint
thisPoint
=
parentSplitter
->
mapToTopLevel
(
mapToParent
(
ev
->
pos
()));
const
int
thisValue
=
Qt
::
Horizontal
?
thisPoint
.
x
()
:
thisPoint
.
y
();
std
::
sort
(
std
::
begin
(
allSplitterSizes
),
std
::
end
(
allSplitterSizes
));
allSplitterSizes
.
removeOne
(
thisValue
);
QSplitterHandle
::
mousePressEvent
(
ev
);
...
...
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