From a9ecb9d8bf785281ed8ccf292cccf3525ffeb457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20L=C3=BCdecke?= Date: Sat, 30 Jul 2022 22:18:50 +0200 Subject: [PATCH] Make AuiNotebook compile with wxWidgets 3.2 --- src/ui/aui/AuiNotebook.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ui/aui/AuiNotebook.cpp b/src/ui/aui/AuiNotebook.cpp index f8178e4c..9c85f685 100644 --- a/src/ui/aui/AuiNotebook.cpp +++ b/src/ui/aui/AuiNotebook.cpp @@ -293,7 +293,7 @@ void guAuiTabArt::DrawTab(wxDC &dc, wxWindow * wnd, const wxAuiNotebookPage &pag int close_button_width = 0; if( close_button_state != wxAUI_BUTTON_STATE_HIDDEN ) { - close_button_width = m_activeCloseBmp.GetWidth(); + close_button_width = m_activeCloseBmp.GetDefaultSize().GetWidth(); } @@ -303,12 +303,12 @@ void guAuiTabArt::DrawTab(wxDC &dc, wxWindow * wnd, const wxAuiNotebookPage &pag bitmap_offset = tab_x + 8; // draw bitmap - dc.DrawBitmap(page.bitmap, + dc.DrawBitmap(page.bitmap.GetBitmap(page.bitmap.GetDefaultSize()), // page.bitmap, bitmap_offset, - drawn_tab_yoff + (drawn_tab_height/2) - (page.bitmap.GetHeight()/2), + drawn_tab_yoff + (drawn_tab_height/2) - (page.bitmap.GetDefaultSize().GetHeight()/2), true); - text_offset = bitmap_offset + page.bitmap.GetWidth(); + text_offset = bitmap_offset + page.bitmap.GetDefaultSize().GetWidth(); text_offset += 3; // bitmap padding } else @@ -331,12 +331,12 @@ void guAuiTabArt::DrawTab(wxDC &dc, wxWindow * wnd, const wxAuiNotebookPage &pag // draw close button if necessary if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) { - wxBitmap bmp = m_disabledCloseBmp; + wxBitmap bmp = m_disabledCloseBmp.GetBitmap(m_disabledCloseBmp.GetDefaultSize()); if (close_button_state == wxAUI_BUTTON_STATE_HOVER || close_button_state == wxAUI_BUTTON_STATE_PRESSED) { - bmp = m_activeCloseBmp; + bmp = m_activeCloseBmp.GetBitmap(m_activeCloseBmp.GetDefaultSize()); } wxRect rect(tab_x + tab_width - close_button_width - 1,