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 https://invent.kde.org/teams/plasma-mobile/issues/-/issues/150
This commit is contained in:
parent
64f811107e
commit
8d588f165c
2 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue