From 6c3a7220a587fbd5bee75d7b6c7376339286e25d Mon Sep 17 00:00:00 2001 From: drw Date: Thu, 03 Mar 2005 20:10:24 +0000 Subject: Scale icons appropriately --- (limited to 'core/settings') diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp index d286369..779f6ef 100644 --- a/core/settings/button/buttonsettings.cpp +++ b/core/settings/button/buttonsettings.cpp @@ -25,13 +25,14 @@ */ +#include + +#include + #include #include #include - -#include - #include "buttonsettings.h" #include "buttonutils.h" #include "remapdlg.h" @@ -153,12 +154,15 @@ void ButtonSettings::updateLabels ( ) for ( QListIterator it ( m_infos ); *it; ++it ) { qCopInfo cip = ButtonUtils::inst ( )-> messageToInfo ((*it)-> m_pmsg ); - (*it)-> m_picon-> setPixmap ( cip. m_icon ); + QPixmap pic; + pic.convertFromImage( cip.m_icon.convertToImage().smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + (*it)-> m_picon-> setPixmap ( pic ); (*it)-> m_plabel-> setText ( cip. m_name ); qCopInfo cih = ButtonUtils::inst ( )-> messageToInfo ((*it)-> m_hmsg ); - (*it)-> m_hicon-> setPixmap ( cih. m_icon ); + pic.convertFromImage( cih.m_icon.convertToImage().smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + (*it)-> m_hicon-> setPixmap ( pic ); (*it)-> m_hlabel-> setText ( cih. m_name ); } } -- cgit v0.9.0.2