X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9dc44eff0235c5f30940f32ccc6d9d82a236e7d2..c37b0f0907b07878551a00165b0ad323bd2ccdaf:/src/aui/dockart.cpp diff --git a/src/aui/dockart.cpp b/src/aui/dockart.cpp index c25509122c..df5c65febe 100644 --- a/src/aui/dockart.cpp +++ b/src/aui/dockart.cpp @@ -4,7 +4,6 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2005-05-17 -// RCS-ID: $Id$ // Copyright: (C) Copyright 2005-2006, Kirix Corporation, All Rights Reserved // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// @@ -27,6 +26,8 @@ #include "wx/aui/framemanager.h" #include "wx/aui/dockart.h" +#include "wx/aui/auibook.h" +#include "wx/aui/tabart.h" #ifndef WX_PRECOMP #include "wx/settings.h" @@ -466,7 +467,7 @@ void wxAuiDefaultDockArt::DrawBackground(wxDC& dc, wxWindow *WXUNUSED(window), i dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height); } -void wxAuiDefaultDockArt::DrawBorder(wxDC& dc, wxWindow *WXUNUSED(window), const wxRect& _rect, +void wxAuiDefaultDockArt::DrawBorder(wxDC& dc, wxWindow* window, const wxRect& _rect, wxAuiPaneInfo& pane) { dc.SetPen(m_borderPen); @@ -492,10 +493,21 @@ void wxAuiDefaultDockArt::DrawBorder(wxDC& dc, wxWindow *WXUNUSED(window), const } else { - for (i = 0; i < border_width; ++i) + // notebooks draw the border themselves, so they can use native rendering (e.g. tabartgtk) + wxAuiTabArt* art = 0; + wxAuiNotebook* nb = wxDynamicCast(window, wxAuiNotebook); + if (nb) + art = nb->GetArtProvider(); + + if (art) + art->DrawBorder(dc, window, rect); + else { - dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height); - rect.Deflate(1); + for (i = 0; i < border_width; ++i) + { + dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height); + rect.Deflate(1); + } } } }