summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp18
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
@@ -47,12 +47,13 @@
#include <qdialog.h>
#include <qdragobject.h>
#include <qtextcodec.h>
#include <qevent.h>
#include <qtooltip.h>
#include <qsignal.h>
+#include <qmainwindow.h>
#include "qpeapplication.h"
#include "qpestyle.h"
#include "styleinterface.h"
#if QT_VERSION >= 300
#include <qstylefactory.h>
#else
@@ -143,12 +144,18 @@ public:
#endif
qcopq.clear();
}
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);
}
else {
#ifdef Q_WS_QWS
if ( !nomaximize )
@@ -505,22 +512,22 @@ static void setTreble( int t = 0, int percent = -1 )
QPEApplication::QPEApplication( int & argc, char **argv, Type t )
: QApplication( argc, argv, t )
{
d = new QPEApplicationData;
d->loadTextCodecs();
d->loadImageCodecs();
- int dw = desktop() ->width();
+ int dw = desktop() ->width();
if ( dw < 200 ) {
setFont( QFont( "helvetica", 8 ) );
AppLnk::setSmallIconSize( 10 );
AppLnk::setBigIconSize( 28 );
}
else if ( dw > 600 ) {
- setFont( QFont( "helvetica", 18 ) );
- AppLnk::setSmallIconSize( 24 );
+ setFont( QFont( "helvetica", 18 ) );
+ AppLnk::setSmallIconSize( 24 );
AppLnk::setBigIconSize( 48 );
}
else if ( dw > 200 ) {
setFont( QFont( "helvetica", 10 ) );
AppLnk::setSmallIconSize( 14 );
AppLnk::setBigIconSize( 32 );
@@ -860,12 +867,14 @@ bool QPEApplication::qwsEventFilter( QWSEvent * e )
if ( m == AlwaysOff )
Global::hideInputMethod();
if ( m == AlwaysOn )
Global::showInputMethod();
}
}
+
+
return QApplication::qwsEventFilter( e );
}
#endif
/*!
Destroys the QPEApplication.
@@ -1314,13 +1323,13 @@ void QPEApplication::pidMessage( const QCString& msg, const QByteArray& data)
consider passing TRUE for \a nomaximize rather than the default FALSE.
\sa showMainDocumentWidget()
*/
void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize )
{
- d->show(mw, nomaximize );
+ d->show(mw, nomaximize );
}
/*!
Sets widget \a mw as the mainWidget() and shows it. For small windows,
consider passing TRUE for \a nomaximize rather than the default FALSE.
@@ -1333,12 +1342,13 @@ void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize )
*/
void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize )
{
if ( mw && argc() == 2 )
Global::setDocument( mw, QString::fromUtf8(argv()[1]) );
+
d->show(mw, nomaximize );
}
/*!
If an application is started via a \link qcop.html QCop\endlink