From b2dd5551178c1fdf3fa73a6f0cadb72aa65b5577 Mon Sep 17 00:00:00 2001 From: Benau Date: Wed, 25 Dec 2019 12:20:18 +0800 Subject: [PATCH] Fix screen keyboard with iPhone padding --- src/guiengine/screen_keyboard.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/guiengine/screen_keyboard.cpp b/src/guiengine/screen_keyboard.cpp index 4ee8ce49d..573de2028 100644 --- a/src/guiengine/screen_keyboard.cpp +++ b/src/guiengine/screen_keyboard.cpp @@ -205,6 +205,11 @@ void ScreenKeyboard::createButtons() float pos_x = 3; int total_width = m_area.getWidth() - 2 * (int)pos_x; + int total_padding = irr_driver->getDevice()->getLeftPadding() + + irr_driver->getDevice()->getRightPadding(); + if (total_width - total_padding > 0) + total_width -= total_padding; + char tmp[100]; sprintf(tmp, "%i", pos_y + (height + margin) * i); std::string pos_y_str = tmp;