author | drw <drw> | 2005-05-16 20:38:10 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-16 20:38:10 (UTC) |
commit | 28503944437feb62c0f2c0a8314385bbca3e9eaf (patch) (side-by-side diff) | |
tree | 2b613d2b1bde21bf3e002bb4dc8c474c4d781fe1 /noncore/apps/advancedfm/advancedfmData.cpp | |
parent | 348314c7411500e23ca467289ed92e446be9121b (diff) | |
download | opie-28503944437feb62c0f2c0a8314385bbca3e9eaf.zip opie-28503944437feb62c0f2c0a8314385bbca3e9eaf.tar.gz opie-28503944437feb62c0f2c0a8314385bbca3e9eaf.tar.bz2 |
Resource -> OResource
Diffstat (limited to 'noncore/apps/advancedfm/advancedfmData.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index b43d2ba..aa9db52 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp @@ -15,2 +15,3 @@ #include <opie2/odebug.h> +#include <opie2/oresource.h> #include <qpe/applnk.h> @@ -18,3 +19,2 @@ #include <qpe/qpeapplication.h> -#include <qpe/resource.h> #include <qpe/menubutton.h> @@ -54,6 +54,7 @@ void AdvancedFm::init() { - QPixmap pm; + bool useBigIcon = qApp->desktop()->size().width() > 330; + cdUpButton = new QToolButton( 0,"cdUpButton"); - pm.convertFromImage( Resource::loadImage( "up" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); - cdUpButton->setPixmap( pm ); + cdUpButton->setUsesBigPixmap( useBigIcon ); + cdUpButton->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) ); cdUpButton->setAutoRaise( true ); @@ -62,4 +63,4 @@ void AdvancedFm::init() { qpeDirButton= new QToolButton( 0,"QPEButton"); - pm.convertFromImage( Resource::loadImage( "logo/opielogo" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); - qpeDirButton->setPixmap( pm );//,"",this,"QPEButton"); + qpeDirButton->setUsesBigPixmap( useBigIcon ); + qpeDirButton->setPixmap( Opie::Core::OResource::loadPixmap( "logo/opielogo", Opie::Core::OResource::SmallIcon ) ); qpeDirButton->setAutoRaise( true ); @@ -68,4 +69,4 @@ void AdvancedFm::init() { cfButton = new QToolButton( 0, "CFButton"); - pm.convertFromImage( Resource::loadImage( "cardmon/pcmcia" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); - cfButton->setPixmap( pm ); + cfButton->setUsesBigPixmap( useBigIcon ); + cfButton->setPixmap( Opie::Core::OResource::loadPixmap( "cardmon/pcmcia", Opie::Core::OResource::SmallIcon ) ); cfButton->setAutoRaise( true ); @@ -74,4 +75,4 @@ void AdvancedFm::init() { sdButton = new QToolButton( 0, "SDButton"); - pm.convertFromImage( Resource::loadImage( "advancedfm/sdcard" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); - sdButton->setPixmap( pm ); + sdButton->setUsesBigPixmap( useBigIcon ); + sdButton->setPixmap( Opie::Core::OResource::loadPixmap( "advancedfm/sdcard", Opie::Core::OResource::SmallIcon ) ); sdButton->setAutoRaise( true ); @@ -80,4 +81,4 @@ void AdvancedFm::init() { docButton = new QToolButton( 0,"docsButton"); - pm.convertFromImage( Resource::loadImage( "DocsIcon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); - docButton->setPixmap( pm ); + docButton->setUsesBigPixmap( useBigIcon ); + docButton->setPixmap( Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon ) ); docButton->setAutoRaise( true ); @@ -86,4 +87,4 @@ void AdvancedFm::init() { homeButton = new QToolButton( 0, "homeButton"); - pm.convertFromImage( Resource::loadImage( "home" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); - homeButton->setPixmap( pm ); + homeButton->setUsesBigPixmap( useBigIcon ); + homeButton->setPixmap( Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon ) ); homeButton->setAutoRaise( true ); |