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=52436 Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8ce869f40b
commit
0cbfa9be51
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue