Commit 8d588f16 authored by Rodney Dawes's avatar Rodney Dawes
Browse files

inputpanel: Compensate the 1px difference in height for panel position

It seems there is a 1px offset in the availableArea height, so compensate
by subtracting an extra pixel from the input panel height, to avoid a gap
below the panel.

Fixes teams/plasma-mobile/issues#150
parent 64f81110
Pipeline #203412 passed with stage
in 17 minutes and 30 seconds
......@@ -151,7 +151,7 @@ void InputMethodTest::testOpenClose()
Test::render(surface.data(), toplevelConfigureRequestedSpy.last().first().value<QSize>(), Qt::red);
QVERIFY(frameGeometryChangedSpy.wait());
QCOMPARE(window->frameGeometry().height(), 1024 - keyboardClient->inputGeometry().height());
QCOMPARE(window->frameGeometry().height() - 1, 1024 - keyboardClient->inputGeometry().height());
// Hide the keyboard
textInput->hideInputPanel();
......
......@@ -96,7 +96,9 @@ void KWin::InputPanelV1Window::reposition()
panelSize = panelSize.boundedTo(availableArea.size());
QRect geo(availableArea.bottomLeft() - QPoint{0, panelSize.height()}, panelSize);
// bottomLeft appears to be 1px off, so take an extra pixel off the
// input panel height, to even things back out
QRect geo(availableArea.bottomLeft() - QPoint{0, panelSize.height() - 1}, panelSize);
geo.translate((availableArea.width() - panelSize.width()) / 2, availableArea.height() - outputArea.height());
moveResize(geo);
} break;
......
Supports Markdown
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