From e3aa5a9a9ef9603aa5d9e5afa1a5f4c6b2e10cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 7 Jul 2005 16:45:32 +0000 Subject: [PATCH] simplified the arrow look, still needs improvements, but I think they are better than before, some small display bugs remain, as well as some flickering, but no show-stopper git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13546 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/ScrollBar.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/kits/interface/ScrollBar.cpp b/src/kits/interface/ScrollBar.cpp index df52d183a7..5a1727a164 100644 --- a/src/kits/interface/ScrollBar.cpp +++ b/src/kits/interface/ScrollBar.cpp @@ -1164,7 +1164,7 @@ BScrollBar::_DrawArrowButton(int32 direction, BRect r, bool down) if (down && fPrivateData->fDoRepeat) { light = tint_color(c, (B_DARKEN_1_TINT + B_DARKEN_2_TINT) / 2.0); arrow2 = dark = tint_color(c, B_LIGHTEN_MAX_TINT); - normal = c; + normal = tint_color(c, B_DARKEN_1_TINT); arrow = tint_color(c, B_DARKEN_MAX_TINT); } else { @@ -1182,7 +1182,7 @@ BScrollBar::_DrawArrowButton(int32 direction, BRect r, bool down) arrow2 = light = tint_color(c, B_LIGHTEN_MAX_TINT); dark = tint_color(c, (B_DARKEN_1_TINT + B_DARKEN_2_TINT) / 2.0); normal = c; - arrow = tint_color(c, B_DARKEN_MAX_TINT); + arrow = tint_color(c, (B_DARKEN_MAX_TINT + B_DARKEN_4_TINT) / 2.0); } else { arrow2 = light = tint_color(c, B_LIGHTEN_1_TINT); dark = tint_color(c, B_DARKEN_1_TINT); @@ -1223,6 +1223,13 @@ BScrollBar::_DrawArrowButton(int32 direction, BRect r, bool down) break; } } + // offset triangle if down + if (down && fPrivateData->fDoRepeat) { + BPoint offset(1.0, 1.0); + tri1 = tri1 + offset; + tri2 = tri2 + offset; + tri3 = tri3 + offset; + } r.InsetBy(1, 1); SetHighColor(normal); @@ -1230,12 +1237,13 @@ BScrollBar::_DrawArrowButton(int32 direction, BRect r, bool down) SetHighColor(arrow); FillTriangle(tri1, tri2, tri3); - SetHighColor(dark); + +/* SetHighColor(dark); StrokeLine(tri2, tri3); StrokeLine(tri1, tri3); SetHighColor(arrow2); - StrokeLine(tri1, tri2); + StrokeLine(tri1, tri2);*/ r.InsetBy(-1, -1); BeginLineArray(4);