mirror of
https://github.com/reactos/reactos.git
synced 2025-07-29 09:41:48 +00:00
[UXTHEME] Add missing THEME_BUTTON_STATES
CORE-14245 #resolve
This commit is contained in:
parent
9e07da5ccb
commit
25564cda9d
2 changed files with 9 additions and 8 deletions
|
@ -289,7 +289,7 @@ ThemeDrawCaptionButton(PDRAW_CONTEXT pcontext,
|
|||
if (!(pcontext->wi.dwStyle & WS_MINIMIZEBOX))
|
||||
return;
|
||||
else
|
||||
iStateId = BUTTON_DISABLED;
|
||||
iStateId = (pcontext->Active ? BUTTON_DISABLED : BUTTON_INACTIVE_DISABLED);
|
||||
}
|
||||
|
||||
iPartId = pcontext->wi.dwStyle & WS_MAXIMIZE ? WP_RESTOREBUTTON : WP_MAXBUTTON;
|
||||
|
@ -301,7 +301,7 @@ ThemeDrawCaptionButton(PDRAW_CONTEXT pcontext,
|
|||
if (!(pcontext->wi.dwStyle & WS_MAXIMIZEBOX))
|
||||
return;
|
||||
else
|
||||
iStateId = BUTTON_DISABLED;
|
||||
iStateId = (pcontext->Active ? BUTTON_DISABLED : BUTTON_INACTIVE_DISABLED);
|
||||
}
|
||||
|
||||
iPartId = pcontext->wi.dwStyle & WS_MINIMIZE ? WP_RESTOREBUTTON : WP_MINBUTTON;
|
||||
|
@ -322,13 +322,11 @@ static DWORD
|
|||
ThemeGetButtonState(DWORD htCurrect, DWORD htHot, DWORD htDown, BOOL Active)
|
||||
{
|
||||
if (htHot == htCurrect)
|
||||
return BUTTON_HOT;
|
||||
if (!Active)
|
||||
return BUTTON_INACTIVE;
|
||||
return (Active ? BUTTON_HOT : BUTTON_INACTIVE_HOT);
|
||||
if (htDown == htCurrect)
|
||||
return BUTTON_PRESSED;
|
||||
return (Active ? BUTTON_PRESSED : BUTTON_INACTIVE_PRESSED);
|
||||
|
||||
return BUTTON_NORMAL;
|
||||
return (Active ? BUTTON_NORMAL : BUTTON_INACTIVE);
|
||||
}
|
||||
|
||||
/* Used only from mouse event handlers */
|
||||
|
|
|
@ -205,7 +205,10 @@ typedef enum {
|
|||
BUTTON_HOT ,
|
||||
BUTTON_PRESSED ,
|
||||
BUTTON_DISABLED ,
|
||||
BUTTON_INACTIVE
|
||||
BUTTON_INACTIVE ,
|
||||
BUTTON_INACTIVE_HOT ,
|
||||
BUTTON_INACTIVE_PRESSED ,
|
||||
BUTTON_INACTIVE_DISABLED
|
||||
} THEME_BUTTON_STATES;
|
||||
|
||||
#define HT_ISBUTTON(ht) ((ht) == HTMINBUTTON || (ht) == HTMAXBUTTON || (ht) == HTCLOSE || (ht) == HTHELP)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue