From b7141e4d7e4677d0e5b99163d90cd3e6688f9e4d Mon Sep 17 00:00:00 2001 From: James Packer Date: Tue, 21 Apr 2026 08:11:37 +0100 Subject: [PATCH 1/2] Update colours of outline scroll bar, so bar is visible at max/min. --- src/OutlineScrollBar.cpp | 50 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/OutlineScrollBar.cpp b/src/OutlineScrollBar.cpp index c9135b63..9215fcdc 100644 --- a/src/OutlineScrollBar.cpp +++ b/src/OutlineScrollBar.cpp @@ -233,31 +233,10 @@ void OutlineScrollBar::draw() if ( core::isnotzero ( range() ) ) { - // recalculate slider line - core::vector2d startPoint; - core::vector2d endPoint; - if (Horizontal) - { - //Slider line - startPoint.X = AbsoluteRect.UpperLeftCorner.X + DrawPos; - endPoint.X = startPoint.X; - startPoint.Y = AbsoluteRect.UpperLeftCorner.Y; - endPoint.Y = AbsoluteRect.LowerRightCorner.Y; - } - else - { - startPoint.Y = AbsoluteRect.UpperLeftCorner.Y + DrawPos; - endPoint.Y = startPoint.Y; - startPoint.X = AbsoluteRect.UpperLeftCorner.X; - endPoint.X = AbsoluteRect.LowerRightCorner.X; - } - - Environment->getVideoDriver()->draw2DLine(startPoint,endPoint,video::SColor(skinAlpha,0,0,0)); - - - if (Secondary) { + + if (Secondary) { //Start secondary line - if ( core::isnotzero ( range() ) ) { + if (core::isnotzero(range())) { // recalculate slider line core::vector2d startPoint; core::vector2d endPoint; @@ -277,10 +256,31 @@ void OutlineScrollBar::draw() endPoint.X = AbsoluteRect.LowerRightCorner.X; } - Environment->getVideoDriver()->draw2DLine(startPoint,endPoint,video::SColor(skinAlpha,64,64,64)); + Environment->getVideoDriver()->draw2DLine(startPoint, endPoint, video::SColor(skinAlpha, 192, 64, 64)); } //End secondary line + } + + // recalculate slider line + core::vector2d startPoint; + core::vector2d endPoint; + if (Horizontal) + { + //Slider line + startPoint.X = AbsoluteRect.UpperLeftCorner.X + DrawPos; + endPoint.X = startPoint.X; + startPoint.Y = AbsoluteRect.UpperLeftCorner.Y; + endPoint.Y = AbsoluteRect.LowerRightCorner.Y; } + else + { + startPoint.Y = AbsoluteRect.UpperLeftCorner.Y + DrawPos; + endPoint.Y = startPoint.Y; + startPoint.X = AbsoluteRect.UpperLeftCorner.X; + endPoint.X = AbsoluteRect.LowerRightCorner.X; + } + + Environment->getVideoDriver()->draw2DLine(startPoint,endPoint,video::SColor(skinAlpha,192,0,0)); //draw tic marks for (unsigned int i = 0; i Date: Tue, 21 Apr 2026 08:17:29 +0100 Subject: [PATCH 2/2] Tidy up variable declarations. --- src/OutlineScrollBar.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/OutlineScrollBar.cpp b/src/OutlineScrollBar.cpp index 9215fcdc..56f58274 100644 --- a/src/OutlineScrollBar.cpp +++ b/src/OutlineScrollBar.cpp @@ -233,13 +233,12 @@ void OutlineScrollBar::draw() if ( core::isnotzero ( range() ) ) { - + core::vector2d startPoint; + core::vector2d endPoint; if (Secondary) { //Start secondary line if (core::isnotzero(range())) { // recalculate slider line - core::vector2d startPoint; - core::vector2d endPoint; if (Horizontal) { //Slider line @@ -262,8 +261,6 @@ void OutlineScrollBar::draw() } // recalculate slider line - core::vector2d startPoint; - core::vector2d endPoint; if (Horizontal) { //Slider line