Commit 0cbfa9be authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

comctl32/button: Use pressed state when a pushlike checkbox or radio button is checked and hovered.

On XP, when a pushlike checkbox or radio button is checked and hovered, PBS_HOT is used. In later versions of Windows, PBS_PRESSED is used. This patch changes pushlike checkboxes and radio buttons to use the new behavior because it seems more intuitive. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52436Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 8ce869f4
......@@ -396,7 +396,7 @@ static int get_draw_state(const BUTTON_INFO *infoPtr)
static const int pushlike_cb_states[3][DRAW_STATE_COUNT] =
{
{ PBS_NORMAL, PBS_DISABLED, PBS_HOT, PBS_PRESSED, PBS_NORMAL },
{ PBS_PRESSED, PBS_PRESSED, PBS_HOT, PBS_PRESSED, PBS_PRESSED },
{ PBS_PRESSED, PBS_PRESSED, PBS_PRESSED, PBS_PRESSED, PBS_PRESSED },
{ PBS_NORMAL, PBS_DISABLED, PBS_HOT, PBS_PRESSED, PBS_NORMAL }
};
static const int rb_states[2][DRAW_STATE_COUNT] =
......@@ -407,7 +407,7 @@ static int get_draw_state(const BUTTON_INFO *infoPtr)
static const int pushlike_rb_states[2][DRAW_STATE_COUNT] =
{
{ PBS_NORMAL, PBS_DISABLED, PBS_HOT, PBS_PRESSED, PBS_NORMAL },
{ PBS_PRESSED, PBS_PRESSED, PBS_HOT, PBS_PRESSED, PBS_PRESSED }
{ PBS_PRESSED, PBS_PRESSED, PBS_PRESSED, PBS_PRESSED, PBS_PRESSED }
};
static const int gb_states[DRAW_STATE_COUNT] = { GBS_NORMAL, GBS_DISABLED, GBS_NORMAL, GBS_NORMAL, GBS_NORMAL };
LONG style = GetWindowLongW(infoPtr->hwnd, GWL_STYLE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment