More universal way of scaling indicator icon bitmaps.
This commit is contained in:
parent
df3eaf0e03
commit
2a5903cd9b
|
@ -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 );
|
||||
|
||||
|
|
|
@ -48,11 +48,7 @@ class wxMenu;
|
|||
namespace KIUI
|
||||
{
|
||||
|
||||
#ifdef __WXMAC__
|
||||
const int c_IndicatorSizeDIP = 6;
|
||||
#else
|
||||
const int c_IndicatorSizeDIP = 10;
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue