From e50488546a7e181ee55b166efd24af9d1555fb3e Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 13 Nov 2007 14:27:26 +0000 Subject: [PATCH] Getting borders working git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/dirctrlg.h | 4 ++-- src/generic/dirctrlg.cpp | 2 -- src/gtk/win_gtk.cpp | 2 +- src/gtk/window.cpp | 8 +++++++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/wx/generic/dirctrlg.h b/include/wx/generic/dirctrlg.h index 29bff51af6..452db329f1 100644 --- a/include/wx/generic/dirctrlg.h +++ b/include/wx/generic/dirctrlg.h @@ -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 ); diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index c050be5d9f..0164ddfc7b 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -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); diff --git a/src/gtk/win_gtk.cpp b/src/gtk/win_gtk.cpp index de389d6211..c384a70b49 100644 --- a/src/gtk/win_gtk.cpp +++ b/src/gtk/win_gtk.cpp @@ -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 | diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index af14714934..e438bbcf1a 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -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); -- 2.45.2