From 2ed79f8f88fda8bff99af0047e29aa2d0b87477a Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 11 Jan 2022 22:30:19 +0100 Subject: [PATCH] Also fix AUI tab size calculation in high DPI This is similar to the parent commit and does the same thing for the total width calculation. --- src/aui/tabart.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aui/tabart.cpp b/src/aui/tabart.cpp index 347d319928..8ceb85d5cb 100644 --- a/src/aui/tabart.cpp +++ b/src/aui/tabart.cpp @@ -248,9 +248,9 @@ void wxAuiGenericTabArt::SetSizingInfo(const wxSize& tab_ctrl_size, int tot_width = (int)tab_ctrl_size.x - GetIndentSize() - wnd->FromDIP(4); if (m_flags & wxAUI_NB_CLOSE_BUTTON) - tot_width -= m_activeCloseBmp.GetPreferredSizeFor(wnd).x; + tot_width -= m_activeCloseBmp.GetPreferredSizeFor(wnd).x / wnd->GetContentScaleFactor(); if (m_flags & wxAUI_NB_WINDOWLIST_BUTTON) - tot_width -= m_activeWindowListBmp.GetPreferredSizeFor(wnd).x; + tot_width -= m_activeWindowListBmp.GetPreferredSizeFor(wnd).x / wnd->GetContentScaleFactor(); if (tab_count > 0) {