Show higher resolution icons on hidpi in project tree.

This commit is contained in:
Alex Shvartzkop 2024-05-26 07:53:38 +03:00
parent 6eb8bf3d39
commit 696b86ab7d
1 changed files with 9 additions and 1 deletions

View File

@ -119,7 +119,15 @@ void PROJECT_TREE::LoadIcons()
delete m_imageList;
// Make an image list containing small icons
int size = 24;
int size = 24;
double scale = GetContentScaleFactor() * GetDPIScaleFactor();
if( scale >= 2.5 )
size = 64;
else if( scale >= 2.0 )
size = 48;
else if( scale >= 1.5 )
size = 32;
m_imageList = new wxImageList( size, size, true,
static_cast<int>( TREE_FILE_TYPE::MAX ) );