From d110b5b51837b58b6d42520134a446b345b29f83 Mon Sep 17 00:00:00 2001 From: Jeff Young <jeff@rokeby.ie> Date: Thu, 16 Nov 2023 10:30:09 +0000 Subject: [PATCH] Improve edit points rendering on Retina displays. --- common/tool/edit_points.cpp | 10 +++++----- include/tool/edit_points.h | 12 +++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/common/tool/edit_points.cpp b/common/tool/edit_points.cpp index b1d0803337..b190f78250 100644 --- a/common/tool/edit_points.cpp +++ b/common/tool/edit_points.cpp @@ -260,18 +260,18 @@ void EDIT_POINTS::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const if( brightness > 0.5 ) { - borderColor = drawColor.Darkened( 0.3 ).WithAlpha( 0.8 ); - highlightColor = drawColor.Brightened( 0.6 ).WithAlpha( 0.8 ); + borderColor = drawColor.Darkened( 0.7 ).WithAlpha( 0.8 ); + highlightColor = drawColor.Darkened( 0.5 ).WithAlpha( 0.8 ); } else if( brightness > 0.2 ) { - borderColor = drawColor.Darkened( 0.6 ).WithAlpha( 0.8 ); + borderColor = drawColor.Brightened( 0.4 ).WithAlpha( 0.8 ); highlightColor = drawColor.Brightened( 0.3 ).WithAlpha( 0.8 ); } else { - borderColor = drawColor.Brightened( 0.3 ).WithAlpha( 0.8 ); - highlightColor = drawColor.Brightened( 0.6 ).WithAlpha( 0.8 ); + borderColor = drawColor.Brightened( 0.7 ).WithAlpha( 0.8 ); + highlightColor = drawColor.Brightened( 0.5 ).WithAlpha( 0.8 ); } gal->SetFillColor( drawColor ); diff --git a/include/tool/edit_points.h b/include/tool/edit_points.h index 166153df8d..cf86e86846 100644 --- a/include/tool/edit_points.h +++ b/include/tool/edit_points.h @@ -189,11 +189,13 @@ public: ///< Single point size in pixels static const int POINT_SIZE = 8; - ///< Border size when not hovering - static const int BORDER_SIZE = 2; - - ///< Border size when hovering - static const int HOVER_SIZE = 5; +#ifdef __WXMAC__ + static const int BORDER_SIZE = 3; ///< Border size when not hovering + static const int HOVER_SIZE = 6; ///< Border size when hovering +#else + static const int BORDER_SIZE = 2; ///< Border size when not hovering + static const int HOVER_SIZE = 5; ///< Border size when hovering +#endif private: VECTOR2I m_position; ///< Position of EDIT_POINT.