on xenial help sign in
fix virtual keyboard height
commit3a75b003037a175876cab5f6ccef119d7b773a50 authorMichael Zanetti <michael.zanetti@canonical.com> dateMon 26 Sep 2016, 14:25 (10 years ago) parentfd93f1c
2 files changed+10−7
tests/mocks/Unity/Application/MirSurface.cpp+1 tests/mocks/Unity/Application/VirtualKeyboard.cpp+9−7
tests/mocks/Unity/Application/MirSurface.cpp+1
@@ -256,6 +256,7 @@ void MirSurface::updateVisibility()
256256
257257 m_visible = newVisible;
258258 Q_EMIT visibleChanged(m_visible);
259+ updateInputBoundsAfterResize();
259260 }
260261}
261262
tests/mocks/Unity/Application/VirtualKeyboard.cpp+9−7
@@ -39,13 +39,15 @@ void VirtualKeyboard::updateInputBoundsAfterResize()
3939{
4040 int width = this->width();
4141
42− int height;
43− if (this->width() > this->height()) {
44− // landscape
45− height = this->height() * 0.4;
46− } else {
47− // portrait
48− height = this->width() * 0.6;
42+ int height = 0;
43+ if (visible()) {
44+ if (this->width() > this->height()) {
45+ // landscape
46+ height = this->height() * 0.4;
47+ } else {
48+ // portrait
49+ height = this->width() * 0.6;
50+ }
4951 }
5052
5153 int x = 0;