mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[0.4.11] [COMCTL32] button: Don't erase the area of the checkbox or the text.
Attempt to fix the menace of the world, CORE-13278.
Note that this can also cause visual glitches for classic check boxes or
radio buttons.
This commit does not fix the flickering to 100%, but it does greatly reduce it.
I will watch out during release tests, whether anything is negatively impacted,
and if yes, I might withdraw the patch. Up to now I did not spot any problems.
cherry picked from commit 0.4.12-dev-347-g
75a80ec823
This commit is contained in:
parent
1d47cfdc1d
commit
fc9e7ba7ea
1 changed files with 11 additions and 0 deletions
|
@ -1550,7 +1550,9 @@ static void CB_Paint( const BUTTON_INFO *infoPtr, HDC hDC, UINT action )
|
|||
|
||||
/* Since WM_ERASEBKGND does nothing, first prepare background */
|
||||
if (action == ODA_SELECT) FillRect( hDC, &rbox, hBrush );
|
||||
#ifndef __REACTOS__
|
||||
if (action == ODA_DRAWENTIRE) FillRect( hDC, &client, hBrush );
|
||||
#endif
|
||||
|
||||
/* Draw label */
|
||||
client = rtext;
|
||||
|
@ -1616,6 +1618,15 @@ static void CB_Paint( const BUTTON_INFO *infoPtr, HDC hDC, UINT action )
|
|||
if (action == ODA_DRAWENTIRE)
|
||||
BUTTON_DrawLabel(infoPtr, hDC, dtFlags, &rtext);
|
||||
|
||||
#ifdef __REACTOS__
|
||||
if (action == ODA_DRAWENTIRE)
|
||||
{
|
||||
ExcludeClipRect(hDC, rbox.left, rbox.top, rbox.right, rbox.bottom);
|
||||
ExcludeClipRect(hDC, rtext.left, rtext.top + 1, rtext.right, rtext.bottom - 1);
|
||||
FillRect( hDC, &client, hBrush );
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ... and focus */
|
||||
if (action == ODA_FOCUS || (state & BST_FOCUS))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue