BControlLook: remove broken intersection check

When using BAffineTransform, the update rect is not in the same
coordinate space as the drawing rectangle. Hence, testing them for
intersection does not work, and leads to not drawing buttons which are
in fact visible.

Moreover, the code in BControlLook does not perform only drawing, it is
also expected to update the drawing rect, so other functions may reuse
it later (for example, drawing a button border also computes the
rectangle for the button background). Because of this, it is not
possible to skip the drawing completely, or we could break the layout of
the client.

Fixes #13664
This commit is contained in:
Adrien Destugues 2017-08-20 15:47:08 +02:00
parent dd582ff9d5
commit 0d1bb791fc

View File

@ -2228,7 +2228,7 @@ BControlLook::_DrawButtonFrame(BView* view, BRect& rect,
const rgb_color& background, float contrast, float brightness, const rgb_color& background, float contrast, float brightness,
uint32 flags, uint32 borders) uint32 flags, uint32 borders)
{ {
if (!rect.IsValid() || !rect.Intersects(updateRect)) if (!rect.IsValid())
return; return;
// save the clipping constraints of the view // save the clipping constraints of the view
@ -2510,7 +2510,7 @@ BControlLook::_DrawButtonBackground(BView* view, BRect& rect,
float leftBottomRadius, float rightBottomRadius, const rgb_color& base, float leftBottomRadius, float rightBottomRadius, const rgb_color& base,
bool popupIndicator, uint32 flags, uint32 borders, orientation orientation) bool popupIndicator, uint32 flags, uint32 borders, orientation orientation)
{ {
if (!rect.IsValid() || !rect.Intersects(updateRect)) if (!rect.IsValid())
return; return;
// save the clipping constraints of the view // save the clipping constraints of the view