Improved the look. Note that we still don't differentiate between enabled and disabled scrollbars
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13408 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -658,7 +658,7 @@ BScrollBar::Draw(BRect updateRect)
|
|||||||
if (fPrivateData->fEnabled) {
|
if (fPrivateData->fEnabled) {
|
||||||
light = tint_color(panelColor, B_LIGHTEN_MAX_TINT);
|
light = tint_color(panelColor, B_LIGHTEN_MAX_TINT);
|
||||||
dark = tint_color(panelColor, B_DARKEN_3_TINT);
|
dark = tint_color(panelColor, B_DARKEN_3_TINT);
|
||||||
normal = panelColor;
|
normal = tint_color(panelColor, B_DARKEN_1_TINT);
|
||||||
} else {
|
} else {
|
||||||
light = tint_color(panelColor, B_LIGHTEN_MAX_TINT);
|
light = tint_color(panelColor, B_LIGHTEN_MAX_TINT);
|
||||||
dark = tint_color(panelColor, B_DARKEN_3_TINT);
|
dark = tint_color(panelColor, B_DARKEN_3_TINT);
|
||||||
@@ -679,12 +679,11 @@ BScrollBar::Draw(BRect updateRect)
|
|||||||
SetDrawingMode(B_OP_COPY);
|
SetDrawingMode(B_OP_COPY);
|
||||||
|
|
||||||
// Draw scroll thumb
|
// Draw scroll thumb
|
||||||
|
|
||||||
if (fPrivateData->fEnabled) {
|
if (fPrivateData->fEnabled) {
|
||||||
BRect rect(fPrivateData->fThumbFrame);
|
BRect rect(fPrivateData->fThumbFrame);
|
||||||
|
|
||||||
SetHighColor(dark);
|
SetHighColor(dark);
|
||||||
StrokeRect(fPrivateData->fThumbFrame);
|
StrokeRect(rect);
|
||||||
|
|
||||||
rect.InsetBy(1,1);
|
rect.InsetBy(1,1);
|
||||||
SetHighColor(tint_color(panelColor, B_DARKEN_2_TINT));
|
SetHighColor(tint_color(panelColor, B_DARKEN_2_TINT));
|
||||||
@@ -697,9 +696,9 @@ BScrollBar::Draw(BRect updateRect)
|
|||||||
|
|
||||||
rect.InsetBy(1,1);
|
rect.InsetBy(1,1);
|
||||||
if (fPrivateData->fTracking)
|
if (fPrivateData->fTracking)
|
||||||
SetHighColor(tint_color(normal, B_DARKEN_1_TINT));
|
|
||||||
else
|
|
||||||
SetHighColor(normal);
|
SetHighColor(normal);
|
||||||
|
else
|
||||||
|
SetHighColor(panelColor);
|
||||||
|
|
||||||
FillRect(rect);
|
FillRect(rect);
|
||||||
}
|
}
|
||||||
@@ -731,6 +730,7 @@ BScrollBar::ResolveSpecifier(BMessage *msg,int32 index,
|
|||||||
void
|
void
|
||||||
BScrollBar::ResizeToPreferred()
|
BScrollBar::ResizeToPreferred()
|
||||||
{
|
{
|
||||||
|
BView::ResizeToPreferred();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user