]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed buttons having no border in wxUniv by default.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Thu, 25 Aug 2011 23:09:00 +0000 (23:09 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Thu, 25 Aug 2011 23:09:00 +0000 (23:09 +0000)
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
build/bakefiles/files.bkl
build/msw/wx_core.dsp
build/msw/wx_vc7_core.vcproj
build/msw/wx_vc8_core.vcproj
build/msw/wx_vc9_core.vcproj
include/wx/anybutton.h
include/wx/univ/anybutton.h [new file with mode: 0644]

index 6d0ed4894e1796de9922801856d3031447b804d8..f5445f16aabc5e6dd4ea01874d4e0b3ebf961618 100644 (file)
@@ -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 \
index 5340ade4b2bdb70daae8b715769fdb8c093b2b1d..50d53a58af1de045c517a547c525ebdfcc80a5bb 100644 (file)
@@ -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
index 38ab8b52e0c741da4dbee7ba256b9a7ee223212c..5e2a46fe0d9b968309a411a2f41c0682b4ed6d6a 100644 (file)
@@ -5684,6 +5684,10 @@ SOURCE=..\..\include\wx\generic\wizard.h
 # PROP Default_Filter ""\r
 # Begin Source File\r
 \r
+SOURCE=..\..\include\wx\univ\anybutton.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\include\wx\univ\app.h\r
 # End Source File\r
 # Begin Source File\r
@@ -5984,10 +5988,10 @@ SOURCE=..\..\include\wx\aui\auibook.h
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\..\include\wx\bannerwindow.h
-# End Source File
-# Begin Source File
-
+SOURCE=..\..\include\wx\bannerwindow.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\include\wx\ribbon\bar.h\r
 # End Source File\r
 # Begin Source File\r
@@ -6448,10 +6452,10 @@ SOURCE=..\..\include\wx\infobar.h
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\..\include\wx\itemid.h
-# End Source File
-# Begin Source File
-
+SOURCE=..\..\include\wx\itemid.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\include\wx\joystick.h\r
 # End Source File\r
 # Begin Source File\r
@@ -6968,10 +6972,10 @@ SOURCE=..\..\include\wx\windowid.h
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\..\include\wx\withimages.h
-# End Source File
-# Begin Source File
-
+SOURCE=..\..\include\wx\withimages.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\include\wx\wizard.h\r
 # End Source File\r
 # Begin Source File\r
@@ -6996,10 +7000,10 @@ SOURCE=..\..\include\wx\xrc\xh_animatctrl.h
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\..\include\wx\xrc\xh_bannerwindow.h
-# End Source File
-# Begin Source File
-
+SOURCE=..\..\include\wx\xrc\xh_bannerwindow.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\include\wx\xrc\xh_bmp.h\r
 # End Source File\r
 # Begin Source File\r
index 3c9f272d858bd90cf8ff798e0cf1e7a2ce7532d0..c911a4b8acfb66cd8efaec8dc172f83f902289c0 100644 (file)
                <Filter\r
                        Name="wxUniv Headers"\r
                        UniqueIdentifier="{46168D7C-2783-50F3-AE9D-A740D5FF0B44}">\r
+                       <File\r
+                               RelativePath="..\..\include\wx\univ\anybutton.h">\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\include\wx\univ\app.h">\r
                        </File>\r
                                RelativePath="..\..\include\wx\aui\auibook.h">\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\include\wx\bannerwindow.h">
-                       </File>
-                       <File
+                               RelativePath="..\..\include\wx\bannerwindow.h">\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\wx\ribbon\bar.h">\r
                        </File>\r
                        <File\r
                                RelativePath="..\..\include\wx\infobar.h">\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\include\wx\itemid.h">
-                       </File>
-                       <File
+                               RelativePath="..\..\include\wx\itemid.h">\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\wx\joystick.h">\r
                        </File>\r
                        <File\r
                                RelativePath="..\..\include\wx\windowid.h">\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\include\wx\withimages.h">
-                       </File>
-                       <File
+                               RelativePath="..\..\include\wx\withimages.h">\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\wx\wizard.h">\r
                        </File>\r
                        <File\r
                                RelativePath="..\..\include\wx\xrc\xh_animatctrl.h">\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\include\wx\xrc\xh_bannerwindow.h">
-                       </File>
-                       <File
+                               RelativePath="..\..\include\wx\xrc\xh_bannerwindow.h">\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\wx\xrc\xh_bmp.h">\r
                        </File>\r
                        <File\r
index 9c5be2f706de226d0fcf4096a6a48bd60d44a418..9763be02f30add328d066fe25197198b4b833c7e 100644 (file)
                        Name="wxUniv Headers"\r
                        UniqueIdentifier="{46168D7C-2783-50F3-AE9D-A740D5FF0B44}"\r
                        >\r
+                       <File\r
+                               RelativePath="..\..\include\wx\univ\anybutton.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\include\wx\univ\app.h"\r
                                >\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\include\wx\bannerwindow.h"
-                               >
-                       </File>
-                       <File
+                               RelativePath="..\..\include\wx\bannerwindow.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\wx\ribbon\bar.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\include\wx\itemid.h"
-                               >
-                       </File>
-                       <File
+                               RelativePath="..\..\include\wx\itemid.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\wx\joystick.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\include\wx\withimages.h"
-                               >
-                       </File>
-                       <File
+                               RelativePath="..\..\include\wx\withimages.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\wx\wizard.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\include\wx\xrc\xh_bannerwindow.h"
-                               >
-                       </File>
-                       <File
+                               RelativePath="..\..\include\wx\xrc\xh_bannerwindow.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\wx\xrc\xh_bmp.h"\r
                                >\r
                        </File>\r
index a2ebc1ddfdcfd1e2abd43a47dd4456fe3a7f2b31..d945bab6d2ada7bea56d68146328a6820d340b4a 100644 (file)
                        Name="wxUniv Headers"\r
                        UniqueIdentifier="{46168D7C-2783-50F3-AE9D-A740D5FF0B44}"\r
                        >\r
+                       <File\r
+                               RelativePath="..\..\include\wx\univ\anybutton.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\include\wx\univ\app.h"\r
                                >\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\include\wx\bannerwindow.h"
-                               >
-                       </File>
-                       <File
+                               RelativePath="..\..\include\wx\bannerwindow.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\wx\ribbon\bar.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\include\wx\itemid.h"
-                               >
-                       </File>
-                       <File
+                               RelativePath="..\..\include\wx\itemid.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\wx\joystick.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\include\wx\withimages.h"
-                               >
-                       </File>
-                       <File
+                               RelativePath="..\..\include\wx\withimages.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\wx\wizard.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\include\wx\xrc\xh_bannerwindow.h"
-                               >
-                       </File>
-                       <File
+                               RelativePath="..\..\include\wx\xrc\xh_bannerwindow.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\wx\xrc\xh_bmp.h"\r
                                >\r
                        </File>\r
index f5a6cb7c3a3a8030b117db01cf85c1b7eefa4a53..9b7417917bf9d8999f83a523b7db36cc964611df 100644 (file)
@@ -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 (file)
index 0000000..6743fa4
--- /dev/null
@@ -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_