From 59ffed85ba297dc77721d3a2d8cd6dae44073e3c Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Mon, 7 Sep 2015 18:28:33 +0100 Subject: [PATCH] gui: Fix image list scaling The listbook images aren't rescaled unless the embedded icons are used. Make sure all the images are correctly rescaled. --- pcsx2/gui/AppRes.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pcsx2/gui/AppRes.cpp b/pcsx2/gui/AppRes.cpp index 0585df3e76..e4e52eeeb8 100644 --- a/pcsx2/gui/AppRes.cpp +++ b/pcsx2/gui/AppRes.cpp @@ -177,7 +177,8 @@ wxImageList& Pcsx2App::GetImgList_Config() ScopedPtr& images( GetResourceCache().ConfigImages ); if( !images ) { - images = new wxImageList(32, 32); + int image_size = g_Conf->Listbook_ImageSize; + images = new wxImageList(image_size, image_size); wxFileName mess; bool useTheme = (g_Conf->DeskTheme != L"default"); @@ -200,10 +201,10 @@ wxImageList& Pcsx2App::GetImgList_Config() #undef FancyLoadMacro #define FancyLoadMacro( name ) \ { \ - EmbeddedImage temp( g_Conf->Listbook_ImageSize, g_Conf->Listbook_ImageSize ); \ - m_Resources->ImageId.Config.name = images->Add( LoadImageAny( \ - img, useTheme, mess, L"ConfigIcon_" wxT(#name), temp ) \ - ); \ + EmbeddedImage temp; \ + LoadImageAny(img, useTheme, mess, L"ConfigIcon_" wxT(#name), temp); \ + img.Rescale(image_size, image_size, wxIMAGE_QUALITY_HIGH); \ + m_Resources->ImageId.Config.name = images->Add(img); \ } FancyLoadMacro( Paths );