Applied patch 1489656: support for wxToggleButton under wxUniversal

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-05-23 17:53:50 +00:00
parent 35932e0596
commit 43be3c33f3
6 changed files with 630 additions and 7 deletions

View File

@@ -57,6 +57,9 @@
#include "wx/artprov.h"
#include "wx/toplevel.h"
#include "wx/image.h"
#ifdef wxUSE_TOGGLEBTN
#include "wx/tglbtn.h"
#endif // wxUSE_TOGGLEBTN
#include "wx/univ/scrtimer.h"
#include "wx/univ/renderer.h"
@@ -4341,8 +4344,15 @@ void wxWin32Renderer::AdjustSize(wxSize *size, const wxWindow *window)
// do nothing
} else
#endif // wxUSE_BMPBUTTON
#if wxUSE_BUTTON
if ( wxDynamicCast(window, wxButton) )
#if wxUSE_BUTTON || wxUSE_TOGGLEBTN
if ( 0
# if wxUSE_BUTTON
|| wxDynamicCast(window, wxButton)
# endif // wxUSE_BUTTON
# if wxUSE_TOGGLEBTN
|| wxDynamicCast(window, wxToggleButton)
# endif // wxUSE_TOGGLEBTN
)
{
if ( !(window->GetWindowStyle() & wxBU_EXACTFIT) )
{
@@ -4371,7 +4381,7 @@ void wxWin32Renderer::AdjustSize(wxSize *size, const wxWindow *window)
// no border width adjustments for buttons
return;
}
#endif // wxUSE_BUTTON
#endif // wxUSE_BUTTON || wxUSE_TOGGLEBTN
// take into account the border width
wxRect rectBorder = GetBorderDimensions(window->GetBorder());