Commit f16fc416 authored by Niklas Freund's avatar Niklas Freund
Browse files

Final simplification of workaround for KWin bug 443681

parent 9ba97875
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment