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
KCalc
Commits
f16fc416
Commit
f16fc416
authored
Oct 15, 2021
by
Niklas Freund
Browse files
Final simplification of workaround for KWin bug 443681
parent
9ba97875
Changes
1
Hide whitespace changes
Inline
Side-by-side
kcalc.cpp
View file @
f16fc416
...
...
@@ -2782,10 +2782,7 @@ void KCalculator::resizeEvent(QResizeEvent* event)
// If the content size is now larger than the window size, resize window to fit
// (Workaround for bug where changing from simple to science mode in maximized state
// and then restoring results in the window being too small for content)
QSize
contentSize
=
KCalculator
::
contentsRect
().
size
();
QMargins
contentMargins
=
KCalculator
::
contentsMargins
();
QSize
actualSize
(
contentSize
.
width
()
+
contentMargins
.
left
()
+
contentMargins
.
right
(),
contentSize
.
height
()
+
contentMargins
.
top
()
+
contentMargins
.
bottom
());
QSize
actualSize
=
KCalculator
::
size
();
QSize
minSize
=
KCalculator
::
minimumSize
();
if
(
actualSize
.
width
()
<
minSize
.
width
()
||
actualSize
.
height
()
<
minSize
.
height
())
{
KCalculator
::
resize
(
minSize
);
// force window as small as possible for current layout
...
...
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