From: Julian Smart Date: Tue, 13 Nov 2007 14:44:21 +0000 (+0000) Subject: wxBORDER_THEME processing for Motif and X11 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cce69fec84c97cd1fe0b5ae2f843b371445cc864 wxBORDER_THEME processing for Motif and X11 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp index 35f8c16640..595e14696a 100644 --- a/src/motif/utils.cpp +++ b/src/motif/utils.cpp @@ -639,7 +639,7 @@ WXWidget wxCreateBorderWidget( WXWidget parent, long style ) NULL ); } - else if (style & wxSUNKEN_BORDER) + else if ((style & wxSUNKEN_BORDER) || (style & wxBORDER_THEME)) { borderWidget = XtVaCreateManagedWidget ( diff --git a/src/motif/window.cpp b/src/motif/window.cpp index d219483039..17373e001a 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -230,6 +230,11 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id, long style, const wxString& name) { + // Get default border + wxBorder border = GetBorder(style); + style &= ~wxBORDER_MASK; + style |= border; + wxCHECK_MSG( parent, false, "can't create wxWindow without parent" ); CreateBase(parent, id, pos, size, style, wxDefaultValidator, name); diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 7026b5aa65..d7bac60b2a 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -122,6 +122,11 @@ bool wxWindowX11::Create(wxWindow *parent, wxWindowID id, { wxCHECK_MSG( parent, false, wxT("can't create wxWindow without parent") ); + // Get default border + wxBorder border = GetBorder(style); + style &= ~wxBORDER_MASK; + style |= border; + CreateBase(parent, id, pos, size, style, wxDefaultValidator, name); parent->AddChild(this); @@ -164,7 +169,7 @@ bool wxWindowX11::Create(wxWindow *parent, wxWindowID id, #if wxUSE_TWO_WINDOWS bool need_two_windows = - ((( wxSUNKEN_BORDER | wxRAISED_BORDER | wxSIMPLE_BORDER | wxHSCROLL | wxVSCROLL ) & m_windowStyle) != 0); + ((( wxSUNKEN_BORDER | wxBORDER_THEME | wxRAISED_BORDER | wxSIMPLE_BORDER | wxHSCROLL | wxVSCROLL ) & m_windowStyle) != 0); #else bool need_two_windows = false; #endif @@ -230,7 +235,7 @@ bool wxWindowX11::Create(wxWindow *parent, wxWindowID id, } #endif - if (HasFlag( wxSUNKEN_BORDER) || HasFlag( wxRAISED_BORDER)) + if (HasFlag(wxSUNKEN_BORDER) || HasFlag(wxRAISED_BORDER) || HasFlag(wxBORDER_THEME)) { pos2.x = 2; pos2.y = 2;