Formspecs: Fix text clipped by scrollbars (#7816)
authorrandom-geek <35757396+random-geek@users.noreply.github.com>
Tue, 6 Nov 2018 22:28:34 +0000 (14:28 -0800)
committerParamat <paramat@users.noreply.github.com>
Tue, 6 Nov 2018 22:28:34 +0000 (22:28 +0000)
src/gui/guiEditBoxWithScrollbar.cpp
src/gui/intlGUIEditBox.cpp

index 4723437bda39af7fd9c1252c119568cf31c4ea9e..f7f933527a91ac99f052e358cf2afeef04c8f6b7 100644 (file)
@@ -1401,6 +1401,8 @@ void GUIEditBoxWithScrollBar::createVScrollBar()
 
        m_scrollbar_width = skin ? skin->getSize(gui::EGDS_SCROLLBAR_SIZE) : 16;
 
+       RelativeRect.LowerRightCorner.X -= m_scrollbar_width + 4;
+
        irr::core::rect<s32> scrollbarrect = m_frame_rect;
        scrollbarrect.UpperLeftCorner.X += m_frame_rect.getWidth() - m_scrollbar_width;
        m_vscrollbar = Environment->addScrollBar(false, scrollbarrect, getParent(), getID());
index 0b7adffc44c7b405f5e1a37c2278ea65e1d6a5fd..374fcc8bbf7fd1a4e9bd62cceeb8925f22aa3b88 100644 (file)
@@ -1482,6 +1482,8 @@ void intlGUIEditBox::createVScrollBar()
                }
        }
 
+       RelativeRect.LowerRightCorner.X -= m_scrollbar_width + 4;
+
        irr::core::rect<s32> scrollbarrect = FrameRect;
        scrollbarrect.UpperLeftCorner.X += FrameRect.getWidth() - m_scrollbar_width;
        m_vscrollbar = Environment->addScrollBar(false, scrollbarrect, getParent(), getID());