on xenial help sign in
fix virtual keyboard height
3a75b00Michael Zanetti
tests/mocks/Unity/Application/MirSurface.cpp+1
@@ -256,6 +256,7 @@ void MirSurface::updateVisibility()
256
256
257 m_visible = newVisible;
257 m_visible = newVisible;
258 Q_EMIT visibleChanged(m_visible);
258 Q_EMIT visibleChanged(m_visible);
259+ updateInputBoundsAfterResize();
259 }
260 }
260}
261}
261
262
tests/mocks/Unity/Application/VirtualKeyboard.cpp+9−7
@@ -39,13 +39,15 @@ void VirtualKeyboard::updateInputBoundsAfterResize()
39{
39{
40 int width = this->width();
40 int width = this->width();
41
41
42− int height;
42+ int height = 0;
43+ if (visible()) {
43− if (this->width() > this->height()) {
44+ if (this->width() > this->height()) {
44− // landscape
45+ // landscape
45− height = this->height() * 0.4;
46+ height = this->height() * 0.4;
46− } else {
47+ } else {
47− // portrait
48+ // portrait
48− height = this->width() * 0.6;
49+ height = this->width() * 0.6;
50+ }
49 }
51 }
50
52
51 int x = 0;
53 int x = 0;