Decorator looks *much* more like R5. Thanks to Thomas Winwood for the patch. :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20215 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -905,10 +905,8 @@ BeDecorator::_DrawTab(BRect invalid)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// TODO: cache these
|
// TODO: cache these
|
||||||
RGBColor tabColorLight = RGBColor(tint_color(fTabColor.GetColor32(),
|
RGBColor tabColorLight = RGBColor(tint_color(fTabColor.GetColor32(),B_LIGHTEN_2_TINT));
|
||||||
(B_LIGHTEN_2_TINT + B_LIGHTEN_MAX_TINT) / 2));
|
RGBColor tabColorShadow = RGBColor(tint_color(fTabColor.GetColor32(),B_DARKEN_2_TINT));
|
||||||
RGBColor tabColorShadow = RGBColor(tint_color(fTabColor.GetColor32(),
|
|
||||||
B_DARKEN_2_TINT));
|
|
||||||
|
|
||||||
// outer frame
|
// outer frame
|
||||||
fDrawingEngine->StrokeLine(fTabRect.LeftTop(), fTabRect.LeftBottom(), fFrameColors[0]);
|
fDrawingEngine->StrokeLine(fTabRect.LeftTop(), fTabRect.LeftBottom(), fFrameColors[0]);
|
||||||
@@ -1059,7 +1057,19 @@ BeDecorator::_SetColors()
|
|||||||
void
|
void
|
||||||
BeDecorator::_DrawBlendedRect(BRect r, bool down)
|
BeDecorator::_DrawBlendedRect(BRect r, bool down)
|
||||||
{
|
{
|
||||||
// Actually just draws a blended square
|
BRect r1 = r;
|
||||||
|
BRect r2 = r;
|
||||||
|
|
||||||
|
r1.left += 1.0;
|
||||||
|
r1.top += 1.0;
|
||||||
|
|
||||||
|
r2.bottom -= 1.0;
|
||||||
|
r2.right -= 1.0;
|
||||||
|
|
||||||
|
// TODO: replace these with cached versions? does R5 use different colours?
|
||||||
|
RGBColor tabColorLight = RGBColor(tint_color(fTabColor.GetColor32(),B_LIGHTEN_2_TINT));
|
||||||
|
RGBColor tabColorShadow = RGBColor(tint_color(fTabColor.GetColor32(),B_DARKEN_2_TINT));
|
||||||
|
|
||||||
int32 w = r.IntegerWidth();
|
int32 w = r.IntegerWidth();
|
||||||
int32 h = r.IntegerHeight();
|
int32 h = r.IntegerHeight();
|
||||||
|
|
||||||
@@ -1098,7 +1108,11 @@ BeDecorator::_DrawBlendedRect(BRect r, bool down)
|
|||||||
fDrawingEngine->StrokeLine(BPoint(r.left + steps, r.top + i),
|
fDrawingEngine->StrokeLine(BPoint(r.left + steps, r.top + i),
|
||||||
BPoint(r.left + i, r.top + steps), temprgbcol);
|
BPoint(r.left + i, r.top + steps), temprgbcol);
|
||||||
}
|
}
|
||||||
fDrawingEngine->StrokeRect(r, fFrameColors[3]);
|
|
||||||
|
// draw bevelling effect on box
|
||||||
|
fDrawingEngine->StrokeRect(r2, tabColorShadow); // inner dark box
|
||||||
|
fDrawingEngine->StrokeRect(r, tabColorShadow); // outer dark box
|
||||||
|
fDrawingEngine->StrokeRect(r1, tabColorLight); // light box
|
||||||
}
|
}
|
||||||
|
|
||||||
// _GetButtonSizeAndOffset
|
// _GetButtonSizeAndOffset
|
||||||
|
|||||||
Reference in New Issue
Block a user