From e303231d009e03ae73a18dee728f03221ca01bf6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 26 Oct 2019 16:54:16 +0200 Subject: [PATCH] Simplify drawing plain background in AUI toolbars Don't bother adjusting the rectangle, just set the pen correctly to avoid drawing its borders. Closes #17616. --- src/aui/auibar.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp index 4f3a694382..582afd0a31 100644 --- a/src/aui/auibar.cpp +++ b/src/aui/auibar.cpp @@ -228,15 +228,12 @@ void wxAuiGenericToolBarArt::DrawBackground( void wxAuiGenericToolBarArt::DrawPlainBackground(wxDC& dc, wxWindow* WXUNUSED(wnd), - const wxRect& _rect) + const wxRect& rect) { - wxRect rect = _rect; - rect.height++; - dc.SetBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + dc.SetPen(*wxTRANSPARENT_PEN); - dc.DrawRectangle(rect.GetX() - 1, rect.GetY() - 1, - rect.GetWidth() + 2, rect.GetHeight() + 1); + dc.DrawRectangle(rect); } void wxAuiGenericToolBarArt::DrawLabel(