From f4308cf55f492ec9bf2760e660f038007a51adcd Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Thu, 25 Aug 2011 23:09:00 +0000 Subject: [PATCH] Fixed buttons having no border in wxUniv by default. Buttons had a border of wxBORDER_NONE resulting in wxButton::DoDraw not drawing the button's border. Fixed by adding wxAnyButton::GetDefaultBorder() for wxUniv which returns wxBORDER_STATIC. Regression since r67931. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 1 + build/bakefiles/files.bkl | 1 + build/msw/wx_core.dsp | 36 ++++++++++++++++++++---------------- build/msw/wx_vc7_core.vcproj | 27 +++++++++++++++------------ build/msw/wx_vc8_core.vcproj | 36 ++++++++++++++++++++---------------- build/msw/wx_vc9_core.vcproj | 36 ++++++++++++++++++++---------------- include/wx/anybutton.h | 2 +- include/wx/univ/anybutton.h | 33 +++++++++++++++++++++++++++++++++ 8 files changed, 111 insertions(+), 61 deletions(-) create mode 100644 include/wx/univ/anybutton.h diff --git a/Makefile.in b/Makefile.in index 6d0ed4894e..f5445f16aa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3797,6 +3797,7 @@ COND_USE_GUI_1_WXUNIV_1_GUI_CORE_HEADERS = \ wx/generic/listctrl.h \ wx/generic/mdig.h \ wx/generic/statusbr.h \ + wx/univ/anybutton.h \ wx/univ/app.h \ wx/univ/bmpbuttn.h \ wx/univ/button.h \ diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 5340ade4b2..50d53a58af 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -2897,6 +2897,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! wx/generic/listctrl.h wx/generic/mdig.h wx/generic/statusbr.h + wx/univ/anybutton.h wx/univ/app.h wx/univ/bmpbuttn.h wx/univ/button.h diff --git a/build/msw/wx_core.dsp b/build/msw/wx_core.dsp index 38ab8b52e0..5e2a46fe0d 100644 --- a/build/msw/wx_core.dsp +++ b/build/msw/wx_core.dsp @@ -5684,6 +5684,10 @@ SOURCE=..\..\include\wx\generic\wizard.h # PROP Default_Filter "" # Begin Source File +SOURCE=..\..\include\wx\univ\anybutton.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\univ\app.h # End Source File # Begin Source File @@ -5984,10 +5988,10 @@ SOURCE=..\..\include\wx\aui\auibook.h # End Source File # Begin Source File -SOURCE=..\..\include\wx\bannerwindow.h -# End Source File -# Begin Source File - +SOURCE=..\..\include\wx\bannerwindow.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\ribbon\bar.h # End Source File # Begin Source File @@ -6448,10 +6452,10 @@ SOURCE=..\..\include\wx\infobar.h # End Source File # Begin Source File -SOURCE=..\..\include\wx\itemid.h -# End Source File -# Begin Source File - +SOURCE=..\..\include\wx\itemid.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\joystick.h # End Source File # Begin Source File @@ -6968,10 +6972,10 @@ SOURCE=..\..\include\wx\windowid.h # End Source File # Begin Source File -SOURCE=..\..\include\wx\withimages.h -# End Source File -# Begin Source File - +SOURCE=..\..\include\wx\withimages.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\wizard.h # End Source File # Begin Source File @@ -6996,10 +7000,10 @@ SOURCE=..\..\include\wx\xrc\xh_animatctrl.h # End Source File # Begin Source File -SOURCE=..\..\include\wx\xrc\xh_bannerwindow.h -# End Source File -# Begin Source File - +SOURCE=..\..\include\wx\xrc\xh_bannerwindow.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\xrc\xh_bmp.h # End Source File # Begin Source File diff --git a/build/msw/wx_vc7_core.vcproj b/build/msw/wx_vc7_core.vcproj index 3c9f272d85..c911a4b8ac 100644 --- a/build/msw/wx_vc7_core.vcproj +++ b/build/msw/wx_vc7_core.vcproj @@ -4836,6 +4836,9 @@ + + @@ -5064,9 +5067,9 @@ RelativePath="..\..\include\wx\aui\auibook.h"> - - + + - - + + - - + + - - + + + + @@ -6772,10 +6776,10 @@ > - - + + @@ -7236,10 +7240,10 @@ > - - + + @@ -7756,10 +7760,10 @@ > - - + + @@ -7784,10 +7788,10 @@ > - - + + diff --git a/build/msw/wx_vc9_core.vcproj b/build/msw/wx_vc9_core.vcproj index a2ebc1ddfd..d945bab6d2 100644 --- a/build/msw/wx_vc9_core.vcproj +++ b/build/msw/wx_vc9_core.vcproj @@ -6465,6 +6465,10 @@ Name="wxUniv Headers" UniqueIdentifier="{46168D7C-2783-50F3-AE9D-A740D5FF0B44}" > + + @@ -6768,10 +6772,10 @@ > - - + + @@ -7232,10 +7236,10 @@ > - - + + @@ -7752,10 +7756,10 @@ > - - + + @@ -7780,10 +7784,10 @@ > - - + + diff --git a/include/wx/anybutton.h b/include/wx/anybutton.h index f5a6cb7c3a..9b7417917b 100644 --- a/include/wx/anybutton.h +++ b/include/wx/anybutton.h @@ -176,7 +176,7 @@ protected: }; #if defined(__WXUNIVERSAL__) - typedef wxAnyButtonBase wxAnyButton; + #include "wx/univ/anybutton.h" #elif defined(__WXMSW__) #include "wx/msw/anybutton.h" //#elif defined(__WXMOTIF__) diff --git a/include/wx/univ/anybutton.h b/include/wx/univ/anybutton.h new file mode 100644 index 0000000000..6743fa44f2 --- /dev/null +++ b/include/wx/univ/anybutton.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/anybutton.h +// Purpose: wxAnyButton class +// Author: Vadim Zeitlin +// Created: 2000-08-15 (extracted from button.h) +// RCS-ID: $Id$ +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_ANYBUTTON_H_ +#define _WX_UNIV_ANYBUTTON_H_ + +// ---------------------------------------------------------------------------- +// Common button functionality +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase +{ +public: + wxAnyButton() {} + + virtual ~wxAnyButton() {}; + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_STATIC; } + +private: + wxDECLARE_NO_COPY_CLASS(wxAnyButton); +}; + +#endif // _WX_UNIV_ANYBUTTON_H_ -- 2.47.2