ControlLook: Fix redraw issues introduced in hrev50893.
* I was pretty sure that I didn't change the logic, but turns out I was wrong. Sorry about that. * Adjusted copy-pasted comments. Signed-off-by: Adrien Destugues <[email protected]> Fixes #13238.
This commit is contained in:
committed by
Adrien Destugues
parent
99dde24c86
commit
c7fabe22b4
@@ -1445,12 +1445,12 @@ BControlLook::DrawActiveTab(BView* view, BRect& rect, const BRect& updateRect,
|
||||
clipping.Exclude(leftBottomCorner);
|
||||
clipping.Exclude(rightBottomCorner);
|
||||
|
||||
// draw the left top corner
|
||||
// draw the left bottom corner
|
||||
_DrawRoundCornerLeftBottom(view, leftBottomCorner, updateRect, base,
|
||||
edgeShadowColor, edgeLightColor, frameLightColor,
|
||||
frameShadowColor, bevelLightColor, bevelShadowColor,
|
||||
fillGradient);
|
||||
// draw the right top corner
|
||||
// draw the right bottom corner
|
||||
_DrawRoundCornerRightBottom(view, rightBottomCorner, updateRect,
|
||||
base, edgeLightColor, frameShadowColor, bevelShadowColor,
|
||||
fillGradient);
|
||||
@@ -1463,7 +1463,7 @@ BControlLook::DrawActiveTab(BView* view, BRect& rect, const BRect& updateRect,
|
||||
_DrawRoundCornerLeftTop(view, leftTopCorner, updateRect, base,
|
||||
edgeShadowColor, frameLightColor, bevelLightColor,
|
||||
fillGradient);
|
||||
// draw the left top corner
|
||||
// draw the left bottom corner
|
||||
_DrawRoundCornerLeftBottom(view, leftBottomCorner, updateRect, base,
|
||||
edgeShadowColor, edgeLightColor, frameLightColor,
|
||||
frameShadowColor, bevelLightColor, bevelShadowColor,
|
||||
@@ -1478,7 +1478,7 @@ BControlLook::DrawActiveTab(BView* view, BRect& rect, const BRect& updateRect,
|
||||
edgeShadowColor, edgeLightColor, frameLightColor,
|
||||
frameShadowColor, bevelLightColor, bevelShadowColor,
|
||||
fillGradient);
|
||||
// draw the right top corner
|
||||
// draw the right bottom corner
|
||||
_DrawRoundCornerRightBottom(view, rightBottomCorner, updateRect,
|
||||
base, edgeLightColor, frameShadowColor, bevelShadowColor,
|
||||
fillGradient);
|
||||
@@ -1569,29 +1569,34 @@ BControlLook::DrawInactiveTab(BView* view, BRect& rect, const BRect& updateRect,
|
||||
fillGradient.AddColor(tint_color(base, 1.08), 255);
|
||||
}
|
||||
|
||||
BRect background = rect;
|
||||
uint32 bordersToDraw = 0;
|
||||
switch (side) {
|
||||
case B_TOP_BORDER:
|
||||
bordersToDraw = (B_LEFT_BORDER | B_TOP_BORDER | B_RIGHT_BORDER);
|
||||
rect.top += 4;
|
||||
background.bottom = rect.top;
|
||||
break;
|
||||
case B_BOTTOM_BORDER:
|
||||
bordersToDraw = (B_LEFT_BORDER | B_BOTTOM_BORDER | B_RIGHT_BORDER);
|
||||
rect.bottom -= 4;
|
||||
background.top = rect.bottom;
|
||||
break;
|
||||
case B_LEFT_BORDER:
|
||||
bordersToDraw = (B_LEFT_BORDER | B_BOTTOM_BORDER | B_TOP_BORDER);
|
||||
rect.left += 4;
|
||||
background.right = rect.left;
|
||||
break;
|
||||
case B_RIGHT_BORDER:
|
||||
bordersToDraw = (B_RIGHT_BORDER | B_BOTTOM_BORDER | B_TOP_BORDER);
|
||||
rect.right -= 4;
|
||||
background.left = rect.right;
|
||||
break;
|
||||
}
|
||||
|
||||
// active tabs stand out at the top, but this is an inactive tab
|
||||
view->SetHighColor(base);
|
||||
view->FillRect(rect);
|
||||
view->FillRect(background);
|
||||
|
||||
// frame and fill
|
||||
_DrawFrame(view, rect, edgeShadowColor, edgeShadowColor, edgeLightColor,
|
||||
|
||||
Reference in New Issue
Block a user