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
This commit is contained in:
Dimitri Schoolwerth
2011-08-25 23:09:00 +00:00
parent fe62518e7c
commit f4308cf55f
8 changed files with 111 additions and 61 deletions

View 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 \

View 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

View File

@@ -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

View File

@@ -4836,6 +4836,9 @@
<Filter
Name="wxUniv Headers"
UniqueIdentifier="{46168D7C-2783-50F3-AE9D-A740D5FF0B44}">
<File
RelativePath="..\..\include\wx\univ\anybutton.h">
</File>
<File
RelativePath="..\..\include\wx\univ\app.h">
</File>
@@ -5064,9 +5067,9 @@
RelativePath="..\..\include\wx\aui\auibook.h">
</File>
<File
RelativePath="..\..\include\wx\bannerwindow.h">
</File>
<File
RelativePath="..\..\include\wx\bannerwindow.h">
</File>
<File
RelativePath="..\..\include\wx\ribbon\bar.h">
</File>
<File
@@ -5412,9 +5415,9 @@
RelativePath="..\..\include\wx\infobar.h">
</File>
<File
RelativePath="..\..\include\wx\itemid.h">
</File>
<File
RelativePath="..\..\include\wx\itemid.h">
</File>
<File
RelativePath="..\..\include\wx\joystick.h">
</File>
<File
@@ -5802,9 +5805,9 @@
RelativePath="..\..\include\wx\windowid.h">
</File>
<File
RelativePath="..\..\include\wx\withimages.h">
</File>
<File
RelativePath="..\..\include\wx\withimages.h">
</File>
<File
RelativePath="..\..\include\wx\wizard.h">
</File>
<File
@@ -5823,9 +5826,9 @@
RelativePath="..\..\include\wx\xrc\xh_animatctrl.h">
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_bannerwindow.h">
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_bannerwindow.h">
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_bmp.h">
</File>
<File

View File

@@ -6469,6 +6469,10 @@
Name="wxUniv Headers"
UniqueIdentifier="{46168D7C-2783-50F3-AE9D-A740D5FF0B44}"
>
<File
RelativePath="..\..\include\wx\univ\anybutton.h"
>
</File>
<File
RelativePath="..\..\include\wx\univ\app.h"
>
@@ -6772,10 +6776,10 @@
>
</File>
<File
RelativePath="..\..\include\wx\bannerwindow.h"
>
</File>
<File
RelativePath="..\..\include\wx\bannerwindow.h"
>
</File>
<File
RelativePath="..\..\include\wx\ribbon\bar.h"
>
</File>
@@ -7236,10 +7240,10 @@
>
</File>
<File
RelativePath="..\..\include\wx\itemid.h"
>
</File>
<File
RelativePath="..\..\include\wx\itemid.h"
>
</File>
<File
RelativePath="..\..\include\wx\joystick.h"
>
</File>
@@ -7756,10 +7760,10 @@
>
</File>
<File
RelativePath="..\..\include\wx\withimages.h"
>
</File>
<File
RelativePath="..\..\include\wx\withimages.h"
>
</File>
<File
RelativePath="..\..\include\wx\wizard.h"
>
</File>
@@ -7784,10 +7788,10 @@
>
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_bannerwindow.h"
>
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_bannerwindow.h"
>
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_bmp.h"
>
</File>

View File

@@ -6465,6 +6465,10 @@
Name="wxUniv Headers"
UniqueIdentifier="{46168D7C-2783-50F3-AE9D-A740D5FF0B44}"
>
<File
RelativePath="..\..\include\wx\univ\anybutton.h"
>
</File>
<File
RelativePath="..\..\include\wx\univ\app.h"
>
@@ -6768,10 +6772,10 @@
>
</File>
<File
RelativePath="..\..\include\wx\bannerwindow.h"
>
</File>
<File
RelativePath="..\..\include\wx\bannerwindow.h"
>
</File>
<File
RelativePath="..\..\include\wx\ribbon\bar.h"
>
</File>
@@ -7232,10 +7236,10 @@
>
</File>
<File
RelativePath="..\..\include\wx\itemid.h"
>
</File>
<File
RelativePath="..\..\include\wx\itemid.h"
>
</File>
<File
RelativePath="..\..\include\wx\joystick.h"
>
</File>
@@ -7752,10 +7756,10 @@
>
</File>
<File
RelativePath="..\..\include\wx\withimages.h"
>
</File>
<File
RelativePath="..\..\include\wx\withimages.h"
>
</File>
<File
RelativePath="..\..\include\wx\wizard.h"
>
</File>
@@ -7780,10 +7784,10 @@
>
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_bannerwindow.h"
>
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_bannerwindow.h"
>
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_bmp.h"
>
</File>

View 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__)

View File

@@ -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_