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
6de07c6f
Commit
6de07c6f
authored
Feb 08, 2021
by
Waqar Ahmed
Browse files
Fix positioning of dialog once again
parent
b455b0f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/project/branchesdialog.cpp
View file @
6de07c6f
...
...
@@ -295,11 +295,10 @@ void BranchesDialog::updateViewGeometry()
const
QSize
viewMaxSize
(
centralSize
.
width
()
/
2.4
,
centralSize
.
height
()
/
2
);
// Position should be central over window
const
QPoint
centralWidgetPos
=
window
->
parentWidget
()
?
window
->
mapToGlobal
(
window
->
pos
())
:
window
->
pos
();
const
int
xPos
=
std
::
max
(
0
,
centralWidgetPos
.
x
()
+
(
centralSize
.
width
()
-
viewMaxSize
.
width
())
/
2
);
const
int
yPos
=
std
::
max
(
0
,
centralWidgetPos
.
y
()
+
(
centralSize
.
height
()
-
viewMaxSize
.
height
())
*
1
/
4
);
move
(
QPoint
(
xPos
,
yPos
));
const
int
xPos
=
std
::
max
(
0
,
(
centralSize
.
width
()
-
viewMaxSize
.
width
())
/
2
);
const
int
yPos
=
std
::
max
(
0
,
(
centralSize
.
height
()
-
viewMaxSize
.
height
())
*
1
/
4
);
const
QPoint
p
(
xPos
,
yPos
);
move
(
p
+
window
->
pos
());
this
->
setFixedSize
(
viewMaxSize
);
}
Write
Preview
Supports
Markdown
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