Fix clipping rectangle of GUITable row highlight
authorKahrl <kahrl@gmx.net>
Sat, 10 Jan 2015 18:56:14 +0000 (19:56 +0100)
committerKahrl <kahrl@gmx.net>
Sat, 10 Jan 2015 18:56:14 +0000 (19:56 +0100)
src/guiTable.cpp

index 153d0010604580d392787d316b15fb520d69801b..05db228da3d7fe95a2f2ec40274aafd443dbac06 100644 (file)
@@ -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