From 8a1c307f9dfc26a31d42f29f29a5b1c048b99102 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Fri, 01 Apr 2005 23:30:07 +0000 Subject: scale O-Menu-Applet pixmaps according to AppLnk::smallIconSize --- (limited to 'core/applets') diff --git a/core/applets/aboutapplet/about.cpp b/core/applets/aboutapplet/about.cpp index 1dbd4c4..ec214f3 100644 --- a/core/applets/aboutapplet/about.cpp +++ b/core/applets/aboutapplet/about.cpp @@ -1,6 +1,7 @@ #include "about.h" #include "widget.h" +#include #include #include #include @@ -41,13 +42,13 @@ QString AboutApplet::tr( const char* s, const char* p ) const return qApp->translate( "AboutApplet", s, p ); } -QIconSet AboutApplet::icon ( ) const +QIconSet AboutApplet::icon() const { QPixmap pix; QImage img = Resource::loadImage ( "logo/opielogo" ); - if ( !img. isNull ( ) ) - pix. convertFromImage ( img. smoothScale ( 14, 14 ) ); + if ( !img.isNull() ) + pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); return pix; } diff --git a/core/applets/homeapplet/home.cpp b/core/applets/homeapplet/home.cpp index 8a930be..02d1265 100644 --- a/core/applets/homeapplet/home.cpp +++ b/core/applets/homeapplet/home.cpp @@ -1,11 +1,11 @@ +#include "home.h" + +#include #include #include #include -#include "home.h" - - HomeApplet::HomeApplet ( ) : QObject ( 0, "HomeApplet" ) { @@ -46,7 +46,7 @@ QIconSet HomeApplet::icon ( ) const QImage img = Resource::loadImage ( "home" ); if ( !img. isNull ( )) - pix. convertFromImage ( img. smoothScale ( 14, 14 )); + pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); return pix; } diff --git a/core/applets/homeapplet/home.h b/core/applets/homeapplet/home.h index 22ecd47..7f1f006 100644 --- a/core/applets/homeapplet/home.h +++ b/core/applets/homeapplet/home.h @@ -21,6 +21,7 @@ #define __OPIE_HOME_APPLET_H__ #include +#include class HomeApplet : public QObject, public MenuAppletInterface { diff --git a/core/applets/logoutapplet/logout.cpp b/core/applets/logoutapplet/logout.cpp index 0ac0067..0f36f16 100644 --- a/core/applets/logoutapplet/logout.cpp +++ b/core/applets/logoutapplet/logout.cpp @@ -1,3 +1,6 @@ +#include "logout.h" + +#include #include #include @@ -6,9 +9,6 @@ #include -#include "logout.h" - - LogoutApplet::LogoutApplet ( ) : QObject ( 0, "LogoutApplet" ) { @@ -49,7 +49,7 @@ QIconSet LogoutApplet::icon ( ) const QImage img = Resource::loadImage ( "logout" ); if ( !img. isNull ( )) - pix. convertFromImage ( img. smoothScale ( 14, 14 )); + pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); return pix; } diff --git a/core/applets/logoutapplet/logout.h b/core/applets/logoutapplet/logout.h index a991f65..3c17278 100644 --- a/core/applets/logoutapplet/logout.h +++ b/core/applets/logoutapplet/logout.h @@ -21,6 +21,7 @@ #define __OPIE_LOGOUT_APPLET_H__ #include +#include class LogoutApplet : public QObject, public MenuAppletInterface { diff --git a/core/applets/restartapplet2/restart.cpp b/core/applets/restartapplet2/restart.cpp index a169505..eda0005 100644 --- a/core/applets/restartapplet2/restart.cpp +++ b/core/applets/restartapplet2/restart.cpp @@ -1,15 +1,12 @@ // coptright Mon 10-21-2002 01:14:03 by L. Potter +#include "restart.h" + +#include #include #include #include -#include "restart.h" - -// #include -// #include -// #include -//#include /* XPM */ static char *restart_xpm[] = { "16 16 11 1", @@ -71,7 +68,7 @@ QIconSet RestartApplet::icon ( ) const QImage img = ( const char** ) restart_xpm ;//Resource::loadImage ( "Run" ); if ( !img. isNull ( )) - pix. convertFromImage ( img. smoothScale ( 14, 14 )); + pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); return pix; } diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp index f23423d..d13c2c0 100644 --- a/core/applets/rotateapplet/rotate.cpp +++ b/core/applets/rotateapplet/rotate.cpp @@ -33,14 +33,14 @@ /* OPIE */ #include #include +#include #include #include #include #include using namespace Opie::Core; -/* QT */ - +/* STD */ #include RotateApplet::RotateApplet() @@ -142,7 +142,7 @@ QIconSet RotateApplet::icon() const QPixmap pix; QImage img = Resource::loadImage( "Rotation" ); if ( !img.isNull() ) - pix.convertFromImage( img.smoothScale( 14, 14 ) ); + pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); return pix; } diff --git a/core/applets/suspendapplet/suspend.cpp b/core/applets/suspendapplet/suspend.cpp index 0eb94cb..4fbd704 100644 --- a/core/applets/suspendapplet/suspend.cpp +++ b/core/applets/suspendapplet/suspend.cpp @@ -1,11 +1,11 @@ +#include "suspend.h" + +#include #include #include #include -#include "suspend.h" - - SuspendApplet::SuspendApplet ( ) : QObject ( 0, "SuspendApplet" ) { @@ -46,7 +46,7 @@ QIconSet SuspendApplet::icon ( ) const QImage img = Resource::loadImage ( "suspend" ); if ( !img. isNull ( )) - pix. convertFromImage ( img. smoothScale ( 14, 14 )); + pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); return pix; } diff --git a/core/applets/suspendapplet/suspend.h b/core/applets/suspendapplet/suspend.h index 8c54cde..c037adc 100644 --- a/core/applets/suspendapplet/suspend.h +++ b/core/applets/suspendapplet/suspend.h @@ -21,6 +21,7 @@ #define __OPIE_SUSPEND_APPLET_H__ #include +#include class SuspendApplet : public QObject, public MenuAppletInterface { diff --git a/core/applets/vtapplet/vt.cpp b/core/applets/vtapplet/vt.cpp index 7832ee0..ae89635 100644 --- a/core/applets/vtapplet/vt.cpp +++ b/core/applets/vtapplet/vt.cpp @@ -15,6 +15,7 @@ /* OPIE */ #include +#include #include using namespace Opie::Core; @@ -71,7 +72,7 @@ QIconSet VTApplet::icon ( ) const QImage img = Resource::loadImage ( "terminal" ); if ( !img. isNull ( )) - pix. convertFromImage ( img. smoothScale ( 14, 14 )); + pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); return pix; } -- cgit v0.9.0.2