From 0c164b99a17bf7673ea4e96ae863192f07cd0f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=20H=C3=A4mmerling?= Date: Mon, 6 Oct 2025 13:24:52 +0200 Subject: [PATCH] Refine look of new turndown icon Replace striped look by solid fill with 70% opacity and anti-aliasing effect. Take scale factor into account for padding. Fix base shape to be the same for all directions (pointy tip). --- common/widgets/indicator_icon.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/common/widgets/indicator_icon.cpp b/common/widgets/indicator_icon.cpp index 85ee78bea0..d6a55810d5 100644 --- a/common/widgets/indicator_icon.cpp +++ b/common/widgets/indicator_icon.cpp @@ -127,17 +127,21 @@ wxBitmap createTurndown( int size, double aScaleFactor, int aDirection, const wx { wxImage image = createBlankImage( size ); + const unsigned char opacity = 0.70 * wxIMAGE_ALPHA_OPAQUE; + const int padding_start = 0 * aScaleFactor + 0.5; + const int padding_end = 2 * aScaleFactor + 0.5; + int startX = ( size - 1 ) / 2; int len = 1; - int startY = 1 + ( aDirection % 2 ); + int startY = padding_start; - for( int y = startY; y < startY + size - 3; ++y ) + for( int y = 0; y < size - padding_end; ++y ) { - for( int x = startX; x < startX + len; ++x ) + for( int x = 0; x < len; ++x ) { - image.SetRGB( x, y, aColour.Red(), aColour.Green(), aColour.Blue() ); - image.SetAlpha( x, y, ( y % 2 ) ? wxIMAGE_ALPHA_OPAQUE : wxIMAGE_ALPHA_OPAQUE / 2 ); + image.SetRGB( x + startX, y + startY, aColour.Red(), aColour.Green(), aColour.Blue() ); + image.SetAlpha( x + startX, y + startY, ( y % 2 ) || ( ( x > 0 ) && ( x < len - 1 ) ) ? opacity : opacity / 2); } // Next row will start one pixel back and be two pixels longer