summaryrefslogtreecommitdiff
path: root/library/qpeapplication.h
authorzecke <zecke>2004-02-21 23:54:24 (UTC)
committer zecke <zecke>2004-02-21 23:54:24 (UTC)
commit58f490cf6fd94ec27eec01c0ffc9d0411be594e8 (patch) (side-by-side diff)
treef9d3ed019712e09744cd11c4a68df69e1e17605e /library/qpeapplication.h
parent7595c4c5e1004efb0b4a3f6dcbd4d2baf7b9c8ac (diff)
downloadopie-58f490cf6fd94ec27eec01c0ffc9d0411be594e8.zip
opie-58f490cf6fd94ec27eec01c0ffc9d0411be594e8.tar.gz
opie-58f490cf6fd94ec27eec01c0ffc9d0411be594e8.tar.bz2
Default to showMaximized on 240x320 and 320x240 displays
Diffstat (limited to 'library/qpeapplication.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index c0f0bfc..8deca21 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -179,56 +179,54 @@ private:
QCopChannel *pidChannel;
#endif
QPEApplicationData *d;
bool reserved_sh;
};
inline void QPEApplication::showDialog( QDialog* d, bool nomax )
{
QSize sh = d->sizeHint();
int w = QMAX(sh.width(),d->width());
int h = QMAX(sh.height(),d->height());
if ( !nomax
- && ( w > qApp->desktop()->width()*3/4
- || h > qApp->desktop()->height()*3/4 ) )
+ && ( qApp->desktop()->width() <= 320 ) )
{
d->showMaximized();
} else {
d->resize(w,h);
d->show();
}
}
inline int QPEApplication::execDialog( QDialog* d, bool nomax )
{
showDialog(d,nomax);
return d->exec();
}
inline void QPEApplication::showWidget( QWidget* wg, bool nomax )
{
QSize sh = wg->sizeHint();
int w = QMAX(sh.width(),wg->width());
int h = QMAX(sh.height(),wg->height());
if ( !nomax
- && ( w > qApp->desktop()->width()*3/4
- || h > qApp->desktop()->height()*3/4 ) )
+ && ( qApp->desktop()->width() <= 320 ) )
{
wg->showMaximized();
} else {
wg->resize(w,h);
wg->show();
}
}
enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */
inline int TransToDeg ( Transformation t )
{
int d = static_cast<int>( t );
return d * 90;
}