]> git.saurik.com Git - wxWidgets.git/commitdiff
wxBORDER_THEME processing for Motif and X11
authorJulian Smart <julian@anthemion.co.uk>
Tue, 13 Nov 2007 14:44:21 +0000 (14:44 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 13 Nov 2007 14:44:21 +0000 (14:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/motif/utils.cpp
src/motif/window.cpp
src/x11/window.cpp

index 35f8c16640b4b724c103b523296aae13355c86af..595e14696abcd9ba33e3c940e331bdebbcdcb524 100644 (file)
@@ -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
                                    (
index d21948303970187067c9404e35d1dfd3ea3ac995..17373e001a633252bf5fa2894566afc5fd75f1c6 100644 (file)
@@ -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);
index 7026b5aa658b9b4951f34d913b25fb0f830bc58f..d7bac60b2aaa9edb6cd06a39bc89f1bfc8ad8a60 100644 (file)
@@ -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;