From dcdcbbe0781fccc8fab374e9b449c03b10b98679 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 17 Sep 2020 09:29:30 -0700 Subject: [PATCH] Fix wxDataViewCheckIconTextRenderer icon size with GTK3 --- src/common/datavcmn.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index cc0b60c1c6..6cb01b3217 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -2080,7 +2080,11 @@ wxSize wxDataViewCheckIconTextRenderer::GetSize() const if ( m_value.GetIcon().IsOk() ) { +#ifdef __WXGTK3__ + const wxSize sizeIcon = m_value.GetIcon().GetScaledSize(); +#else const wxSize sizeIcon = m_value.GetIcon().GetSize(); +#endif if ( sizeIcon.y > size.y ) size.y = sizeIcon.y; @@ -2137,7 +2141,11 @@ bool wxDataViewCheckIconTextRenderer::Render(wxRect cell, wxDC* dc, int state) const wxIcon& icon = m_value.GetIcon(); if ( icon.IsOk() ) { +#ifdef __WXGTK3__ + const wxSize sizeIcon = icon.GetScaledSize(); +#else const wxSize sizeIcon = icon.GetSize(); +#endif wxRect rectIcon(cell.GetPosition(), sizeIcon); rectIcon.x += xoffset; rectIcon = rectIcon.CentreIn(cell, wxVERTICAL);