author | harlekin <harlekin> | 2003-04-19 22:19:11 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-04-19 22:19:11 (UTC) |
commit | 0374e0e52e9b754ae48ada631cad2b397feabb21 (patch) (side-by-side diff) | |
tree | c4dff4db838838956d7f137b52839a11ddaad0e1 /library/qpeapplication.cpp | |
parent | 29c556ffc9b1497cd996ceb46d646b1eaf1288be (diff) | |
download | opie-0374e0e52e9b754ae48ada631cad2b397feabb21.zip opie-0374e0e52e9b754ae48ada631cad2b397feabb21.tar.gz opie-0374e0e52e9b754ae48ada631cad2b397feabb21.tar.bz2 |
big toolbar icons for screenwidths > 600
-rw-r--r-- | library/qpeapplication.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 2ef60d5..7f8299a 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -51,4 +51,5 @@ #include <qtooltip.h> #include <qsignal.h> +#include <qmainwindow.h> #include "qpeapplication.h" #include "qpestyle.h" @@ -147,4 +148,10 @@ public: static void show_mx(QWidget* mw, bool nomaximize) { + + // ugly hack, remove that later after finding a sane solution + if ( QPEApplication::desktop() ->width() >= 600 && ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) ) { + ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true ); + } + if ( mw->layout() && mw->inherits("QDialog") ) { QPEApplication::showDialog((QDialog*)mw, nomaximize); @@ -509,5 +516,5 @@ QPEApplication::QPEApplication( int & argc, char **argv, Type t ) d->loadTextCodecs(); d->loadImageCodecs(); - int dw = desktop() ->width(); + int dw = desktop() ->width(); if ( dw < 200 ) { @@ -517,6 +524,6 @@ QPEApplication::QPEApplication( int & argc, char **argv, Type t ) } else if ( dw > 600 ) { - setFont( QFont( "helvetica", 18 ) ); - AppLnk::setSmallIconSize( 24 ); + setFont( QFont( "helvetica", 18 ) ); + AppLnk::setSmallIconSize( 24 ); AppLnk::setBigIconSize( 48 ); } @@ -864,4 +871,6 @@ bool QPEApplication::qwsEventFilter( QWSEvent * e ) } } + + return QApplication::qwsEventFilter( e ); } @@ -1318,5 +1327,5 @@ void QPEApplication::pidMessage( const QCString& msg, const QByteArray& data) void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize ) { - d->show(mw, nomaximize ); + d->show(mw, nomaximize ); } @@ -1337,4 +1346,5 @@ void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) Global::setDocument( mw, QString::fromUtf8(argv()[1]) ); + d->show(mw, nomaximize ); } |