More universal way of scaling indicator icon bitmaps.

This commit is contained in:
Alex Shvartzkop 2024-05-26 22:14:52 +03:00
parent df3eaf0e03
commit 2a5903cd9b
2 changed files with 2 additions and 11 deletions

View File

@ -39,7 +39,7 @@ INDICATOR_ICON::INDICATOR_ICON( wxWindow* aParent, ICON_PROVIDER& aIconProvider,
const wxBitmap& icon = m_iconProvider.GetIndicatorIcon( m_currentId );
m_bitmap = new wxStaticBitmap( this, aID, icon, wxDefaultPosition, icon.GetSize() );
m_bitmap = new wxStaticBitmap( this, aID, icon, wxDefaultPosition, icon.GetLogicalSize() );
sizer->Add( m_bitmap, 0, 0 );
@ -175,11 +175,6 @@ ROW_ICON_PROVIDER::ROW_ICON_PROVIDER( int aSizeDIP, wxWindow* aWindow )
double scale = aWindow->GetDPIScaleFactor();
wxColour shadowColor = wxSystemSettings().GetColour( wxSYS_COLOUR_3DDKSHADOW );
#ifdef __WXMAC__
// Adjust for Retina
scale /= KIPLATFORM::UI::GetPixelScaleFactor( aWindow );
#endif
m_blankBitmap = wxBitmap( createBlankImage( toPhys( aSizeDIP ) ) );
m_blankBitmap.SetScaleFactor( scale );

View File

@ -48,11 +48,7 @@ class wxMenu;
namespace KIUI
{
#ifdef __WXMAC__
const int c_IndicatorSizeDIP = 6;
#else
const int c_IndicatorSizeDIP = 10;
#endif
/**