Skip to content

Commit e879dd0

Browse files
Leaf ShiLeaf Shi
authored andcommitted
Distinguishing between pressed and hover states
1 parent 4a93ae2 commit e879dd0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/System.Windows.Forms/System/Windows/Forms/Controls/Buttons/ButtonInternal/DarkMode/PopupButtonDarkModeRenderer.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ private static void DrawButtonBorder(Graphics graphics, Rectangle bounds, PushBu
141141

142142
if (state == PushButtonState.Pressed)
143143
{
144-
// In pressed state, invert the 3D effect: highlight bottom/right, shadow top/left
145-
topLeftOuter = DefaultColors.HighlightColor; // shadow
146-
bottomRightOuter = DefaultColors.HighlightColor; // highlight
147-
topLeftInner = DefaultColors.HighlightBrightColor; // deeper shadow
144+
// In pressed state, invert the 3D effect: brighter highlight bottom/right, deeper shadow top/left
145+
topLeftOuter = DefaultColors.ShadowDarkColor; // deeper shadow
146+
bottomRightOuter = DefaultColors.HighlightBrightColor; // brighter highlight
147+
topLeftInner = DefaultColors.ShadowDarkColor; // deeper shadow
148148
bottomRightInner = DefaultColors.HighlightBrightColor; // brighter highlight
149149
}
150150
else if (state == PushButtonState.Disabled)
@@ -160,8 +160,8 @@ private static void DrawButtonBorder(Graphics graphics, Rectangle bounds, PushBu
160160
// In pressed/hot state, invert the 3D effect: highlight bottom/right, shadow top/left
161161
topLeftOuter = DefaultColors.ShadowColor; // shadow
162162
bottomRightOuter = DefaultColors.HighlightColor; // highlight
163-
topLeftInner = DefaultColors.ShadowDarkColor; // deeper shadow
164-
bottomRightInner = DefaultColors.HighlightBrightColor; // brighter highlight
163+
topLeftInner = DefaultColors.ShadowColor; // shadow
164+
bottomRightInner = DefaultColors.HighlightColor; // highlight
165165
}
166166
else
167167
{

0 commit comments

Comments
 (0)