@@ -59,8 +59,9 @@ void CircularButton::paintEvent(QPaintEvent *)
5959 painter.setRenderHint (QPainter::SmoothPixmapTransform);
6060
6161 // Create a circular path for the button
62+ // Add more inset to prevent clipping of outer border
6263 QPainterPath circlePath;
63- QRect buttonRect = rect ().adjusted (1 , 1 , -1 , -1 ); // Slight inset for border
64+ QRect buttonRect = rect ().adjusted (3 , 3 , -3 , -3 );
6465 circlePath.addEllipse (buttonRect);
6566
6667 // Interpolation helper (linear)
@@ -82,18 +83,18 @@ void CircularButton::paintEvent(QPaintEvent *)
8283 // Draw flat solid background - no gradients
8384 painter.fillPath (circlePath, QColor (r, g, b, alpha));
8485
85- // Inner border - transitions from white to orange
86- int borderR = lerp (255 , orangeR, m_hoverProgress);
87- int borderG = lerp (255 , orangeG, m_hoverProgress);
88- int borderB = lerp (255 , orangeB, m_hoverProgress);
89- int borderAlpha = lerp (180 , 220 , m_hoverProgress);
90-
91- painter.setPen (QPen (QColor (borderR, borderG, borderB, borderAlpha), 0.8 ));
86+ // Inner border - matches background color so it blends in
87+ painter.setPen (QPen (QColor (r, g, b, alpha), 1.5 ));
9288 painter.drawEllipse (buttonRect);
9389
94- // Thin black outer border - always present
95- QRect outerRect = buttonRect.adjusted (-1 , -1 , 1 , 1 );
96- painter.setPen (QPen (QColor (0 , 0 , 0 , 180 ), 0.6 ));
90+ // Outer border - same width on hover and non-hover, transitions from black to white
91+ QRect outerRect = buttonRect.adjusted (-2 , -2 , 2 , 2 );
92+ int outerBorderR = lerp (0 , 255 , m_hoverProgress);
93+ int outerBorderG = lerp (0 , 255 , m_hoverProgress);
94+ int outerBorderB = lerp (0 , 255 , m_hoverProgress);
95+ int outerBorderAlpha = 200 ; // Constant alpha - no change on hover
96+
97+ painter.setPen (QPen (QColor (outerBorderR, outerBorderG, outerBorderB, outerBorderAlpha), 1.5 ));
9798 painter.drawEllipse (outerRect);
9899
99100 if (!icon ().isNull ()) {
0 commit comments