]> git.saurik.com Git - wxWidgets.git/commitdiff
Getting borders working
authorJulian Smart <julian@anthemion.co.uk>
Tue, 13 Nov 2007 14:27:26 +0000 (14:27 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 13 Nov 2007 14:27:26 +0000 (14:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/dirctrlg.h
src/generic/dirctrlg.cpp
src/gtk/win_gtk.cpp
src/gtk/window.cpp

index 29bff51af604bd3f67167833b248a49aac995dc5..452db329f18e6ec6697127dbf0d8ebecf4486d8b 100644 (file)
@@ -88,7 +88,7 @@ public:
               const wxString &dir = wxDirDialogDefaultFolderStr,
               const wxPoint& pos = wxDefaultPosition,
               const wxSize& size = wxDefaultSize,
-              long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER,
+              long style = wxDIRCTRL_3D_INTERNAL,
               const wxString& filter = wxEmptyString,
               int defaultFilter = 0,
               const wxString& name = wxTreeCtrlNameStr )
@@ -101,7 +101,7 @@ public:
               const wxString &dir = wxDirDialogDefaultFolderStr,
               const wxPoint& pos = wxDefaultPosition,
               const wxSize& size = wxDefaultSize,
-              long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER,
+              long style = wxDIRCTRL_3D_INTERNAL,
               const wxString& filter = wxEmptyString,
               int defaultFilter = 0,
               const wxString& name = wxTreeCtrlNameStr );
index c050be5d9fd860371dfe3949f1d4564ac8da5131..0164ddfc7b6b76e6997e6fb33dc6e204b703570e 100644 (file)
@@ -562,8 +562,6 @@ bool wxGenericDirCtrl::Create(wxWindow *parent,
 
     if ((style & wxDIRCTRL_3D_INTERNAL) == 0)
         treeStyle |= wxNO_BORDER;
-    else
-        treeStyle |= wxBORDER_SUNKEN;
 
     m_treeCtrl = CreateTreeCtrl(this, wxID_TREECTRL,
                                 wxPoint(0,0), GetClientSize(), treeStyle);
index de389d621173ae449c8e3789449fc87c5993212a..c384a70b493e47f68ac57e0910dd985b6310d83c 100644 (file)
@@ -303,7 +303,7 @@ GtkWidget* wxPizza::New(long windowStyle)
     pizza->m_scroll_y = 0;
     pizza->m_is_scrollable = (windowStyle & (wxHSCROLL | wxVSCROLL)) != 0;
     pizza->m_border_style =
-        int(windowStyle & (wxBORDER_SIMPLE | wxBORDER_RAISED | wxBORDER_SUNKEN));
+      int(windowStyle & wxBORDER_MASK);
     gtk_fixed_set_has_window(GTK_FIXED(widget), true);
     gtk_widget_add_events(widget,
         GDK_EXPOSURE_MASK |
index af14714934f46b03480e978bb5760955e63953e7..e438bbcf1ae881e728b5303542d351b35b1c5747 100644 (file)
@@ -2226,6 +2226,11 @@ bool wxWindowGTK::Create( wxWindow *parent,
                           long style,
                           const wxString &name  )
 {
+    // Get default border
+    wxBorder border = GetBorder(style);
+    style &= ~wxBORDER_MASK;
+    style |= border;
+    
     if (!PreCreation( parent, pos, size ) ||
         !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
     {
@@ -2233,6 +2238,7 @@ bool wxWindowGTK::Create( wxWindow *parent,
         return false;
     }
 
+
     m_wxwindow = wxPizza::New(m_windowStyle);
     if (!HasFlag(wxHSCROLL) && !HasFlag(wxVSCROLL))
         m_widget = m_wxwindow;
@@ -2408,7 +2414,7 @@ void wxWindowGTK::PostCreation()
 
         // border drawing
 #ifndef __WXUNIVERSAL__
-        if (HasFlag(wxBORDER_SIMPLE | wxBORDER_RAISED | wxBORDER_SUNKEN))
+        if (HasFlag(wxBORDER_SIMPLE | wxBORDER_RAISED | wxBORDER_SUNKEN | wxBORDER_THEME))
         {
             g_signal_connect(m_widget, "expose_event",
                 G_CALLBACK(expose_event_border), this);