Toolbars shouldn't have themed borders
Made it easier to switch off theme borders in wxWindow if necessary git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -71,6 +71,9 @@ public:
|
|||||||
// default style for the control include WS_TABSTOP if it AcceptsFocus()
|
// default style for the control include WS_TABSTOP if it AcceptsFocus()
|
||||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||||
|
|
||||||
|
// choose the default border for this window
|
||||||
|
virtual wxBorder GetDefaultBorder() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// return default best size (doesn't really make any sense, override this)
|
// return default best size (doesn't really make any sense, override this)
|
||||||
virtual wxSize DoGetBestSize() const;
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
@@ -78,6 +78,9 @@ public:
|
|||||||
|
|
||||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||||
|
|
||||||
|
// returns true if the platform should explicitly apply a theme border
|
||||||
|
virtual bool CanApplyThemeBorder() const { return false; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void Init();
|
void Init();
|
||||||
|
@@ -243,6 +243,11 @@ wxSize wxControl::DoGetBestSize() const
|
|||||||
return wxSize(DEFAULT_ITEM_WIDTH, DEFAULT_ITEM_HEIGHT);
|
return wxSize(DEFAULT_ITEM_WIDTH, DEFAULT_ITEM_HEIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxBorder wxControl::GetDefaultBorder() const
|
||||||
|
{
|
||||||
|
return GetDefaultBorderForControl();
|
||||||
|
}
|
||||||
|
|
||||||
// This is a helper for all wxControls made with UPDOWN native control.
|
// This is a helper for all wxControls made with UPDOWN native control.
|
||||||
// In wxMSW it was only wxSpinCtrl derived from wxSpinButton but in
|
// In wxMSW it was only wxSpinCtrl derived from wxSpinButton but in
|
||||||
// WinCE of Smartphones this happens also for native wxTextCtrl,
|
// WinCE of Smartphones this happens also for native wxTextCtrl,
|
||||||
|
@@ -1286,11 +1286,6 @@ void wxWindowMSW::MSWUpdateStyle(long flagsOld, long exflagsOld)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBorder wxWindowMSW::GetDefaultBorder() const
|
|
||||||
{
|
|
||||||
return GetDefaultBorderForControl();
|
|
||||||
}
|
|
||||||
|
|
||||||
wxBorder wxWindowMSW::GetDefaultBorderForControl() const
|
wxBorder wxWindowMSW::GetDefaultBorderForControl() const
|
||||||
{
|
{
|
||||||
// we want to automatically give controls a sunken style (confusingly,
|
// we want to automatically give controls a sunken style (confusingly,
|
||||||
@@ -1312,6 +1307,11 @@ wxBorder wxWindowMSW::GetDefaultBorderForControl() const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxBorder wxWindowMSW::GetDefaultBorder() const
|
||||||
|
{
|
||||||
|
return GetDefaultBorderForControl();
|
||||||
|
}
|
||||||
|
|
||||||
WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
|
WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
|
||||||
{
|
{
|
||||||
// translate common wxWidgets styles to Windows ones
|
// translate common wxWidgets styles to Windows ones
|
||||||
|
Reference in New Issue
Block a user