Fix wxMSW owner drawn buttons appearance in "selected" state.
Draw the buttons (i.e. checkboxes and radio buttons) correctly when the space key is pressed. See #10137. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -566,6 +566,9 @@ bool wxMSWOwnerDrawnButtonBase::MSWDrawButton(WXDRAWITEMSTRUCT *item)
|
|||||||
|
|
||||||
int flags = MSWGetButtonCheckedFlag();
|
int flags = MSWGetButtonCheckedFlag();
|
||||||
|
|
||||||
|
if ( dis->itemState & ODS_SELECTED )
|
||||||
|
flags |= wxCONTROL_SELECTED | wxCONTROL_PRESSED;
|
||||||
|
|
||||||
if ( !m_win->IsEnabled() )
|
if ( !m_win->IsEnabled() )
|
||||||
flags |= wxCONTROL_DISABLED;
|
flags |= wxCONTROL_DISABLED;
|
||||||
|
|
||||||
@@ -620,6 +623,9 @@ bool wxMSWOwnerDrawnButtonBase::MSWDrawButton(WXDRAWITEMSTRUCT *item)
|
|||||||
rectLabel.right = rect.right;
|
rectLabel.right = rect.right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Erase the background.
|
||||||
|
::FillRect(hdc, &rect, m_win->MSWGetBgBrush(hdc));
|
||||||
|
|
||||||
// draw the button itself
|
// draw the button itself
|
||||||
wxDCTemp dc(hdc);
|
wxDCTemp dc(hdc);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user