Skip to content

Commit

Permalink
Formspecs: Fix text clipped by scrollbars (#7816)
Browse files Browse the repository at this point in the history
  • Loading branch information
random-geek authored and paramat committed Nov 6, 2018
1 parent 0e306c0 commit 3a992ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/guiEditBoxWithScrollbar.cpp
Expand Up @@ -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());
Expand Down
2 changes: 2 additions & 0 deletions src/gui/intlGUIEditBox.cpp
Expand Up @@ -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());
Expand Down

0 comments on commit 3a992ce

Please sign in to comment.