summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--Rules.make3
-rw-r--r--config.in5
-rw-r--r--library/qpeapplication.cpp55
3 files changed, 25 insertions, 38 deletions
diff --git a/Rules.make b/Rules.make
index 779f4b1..8511422 100644
--- a/Rules.make
+++ b/Rules.make
@@ -71,5 +71,2 @@ ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y)
71endif 71endif
72ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y)
73 echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@
74endif
75ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) 72ifeq ($(CONFIG_OPIE_NEW_ALLOC),y)
diff --git a/config.in b/config.in
index 60ebd65..9586a33 100644
--- a/config.in
+++ b/config.in
@@ -140,7 +140,2 @@ config QT_QWS_ALLOW_OVERCLOCK
140 140
141config OPIE_HIGH_RES_SMALL_PHY
142 boolean "Resolution is bigger than physical screen"
143 default y if TARGET_C700
144 default n if ! TARGET_C700
145
146config USE_FILE_NOTIFICATION 141config USE_FILE_NOTIFICATION
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 26e310a..4bc0c5f 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -98,2 +98,4 @@
98 98
99static bool useBigPixmaps = 0;
100
99class HackWidget : public QWidget 101class HackWidget : public QWidget
@@ -114,5 +116,14 @@ public:
114 notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ), 116 notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ),
115 keep_running( true ), qcopQok( false ), qpe_main_widget( 0 ) 117 keep_running( true ), qcopQok( false ),
116 118 fontFamily( "Vera" ), fontSize( 10 ), smallIconSize( 14 ),
117 {} 119 bigIconSize( 32 ), qpe_main_widget( 0 )
120 {
121 Config cfg( "qpe" );
122 cfg.setGroup( "Appearance" );
123 useBigPixmaps = cfg.readBoolEntry( "useBigPixmaps", false );
124 fontFamily = cfg.readEntry( "FontFamily", "Vera" );
125 fontSize = cfg.readNumEntry( "FontSize", 10 );
126 smallIconSize = cfg.readNumEntry( "SmallIconSize", 14 );
127 bigIconSize = cfg.readNumEntry( "BigIconSize", 32 );
128 }
118 129
@@ -131,2 +142,6 @@ public:
131 142
143 QCString fontFamily;
144 int fontSize;
145 int smallIconSize;
146 int bigIconSize;
132 147
@@ -175,14 +190,8 @@ public:
175 190
176 static void show_mx(QWidget* mw, bool nomaximize, QString &strName/* = QString::null */) 191 static void show_mx(QWidget* mw, bool nomaximize, QString &strName)
192 {
193 if ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") )
177 { 194 {
178 // ugly hack, remove that later after finding a sane solution 195 ( ( QMainWindow* ) mw )->setUsesBigPixmaps( useBigPixmaps );
179 // Addendum: Only Sharp currently has models with high resolution but (physically) small displays,
180 // so this is only useful if QT_QWS_SIMPAD is NOT defined. E.g. SIMpad has 800x600 but has
181 // a (physically) large enough display to use the small icons
182#if defined(OPIE_HIGH_RES_SMALL_PHY)
183 if ( QPEApplication::desktop() ->width() >= 600 && ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) ) {
184 ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true );
185 } 196 }
186#endif
187
188 QPoint p; 197 QPoint p;
@@ -798,19 +807,5 @@ QPEApplication::QPEApplication( int & argc, char **argv, Type t )
798 807
799 if ( dw < 200 ) { 808 setFont( QFont( d->fontFamily, d->fontSize ) );
800 setFont( QFont( "vera", 8 ) ); 809 AppLnk::setSmallIconSize( d->smallIconSize );
801 AppLnk::setSmallIconSize( 10 ); 810 AppLnk::setBigIconSize( d->bigIconSize );
802 AppLnk::setBigIconSize( 28 );
803 }
804#if defined(OPIE_HIGH_RES_SMALL_PHY)
805 else if ( dw > 600 ) {
806 setFont( QFont( "vera", 16 ) );
807 AppLnk::setSmallIconSize( 24 );
808 AppLnk::setBigIconSize( 48 );
809 }
810#endif
811 else if ( dw > 200 ) {
812 setFont( QFont( "vera", 10 ) );
813 AppLnk::setSmallIconSize( 14 );
814 AppLnk::setBigIconSize( 32 );
815 }
816 811