From: Kahrl Date: Sat, 10 Jan 2015 18:56:14 +0000 (+0100) Subject: Fix clipping rectangle of GUITable row highlight X-Git-Tag: 0.4.12~114 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b7c0e4b3336ef5bdb0bdd6baa3257787886b2c73;p=oweals%2Fminetest.git Fix clipping rectangle of GUITable row highlight --- diff --git a/src/guiTable.cpp b/src/guiTable.cpp index 153d00106..05db228da 100644 --- a/src/guiTable.cpp +++ b/src/guiTable.cpp @@ -638,10 +638,11 @@ void GUITable::draw() client_clip.UpperLeftCorner.Y += 1; client_clip.UpperLeftCorner.X += 1; client_clip.LowerRightCorner.Y -= 1; - client_clip.LowerRightCorner.X -= - m_scrollbar->isVisible() ? - skin->getSize(gui::EGDS_SCROLLBAR_SIZE) : - 1; + client_clip.LowerRightCorner.X -= 1; + if (m_scrollbar->isVisible()) { + client_clip.LowerRightCorner.X = + m_scrollbar->getAbsolutePosition().UpperLeftCorner.X; + } client_clip.clipAgainst(AbsoluteClippingRect); // draw visible rows