author | ar <ar> | 2004-04-21 21:26:14 (UTC) |
---|---|---|
committer | ar <ar> | 2004-04-21 21:26:14 (UTC) |
commit | 2a04bf465c332f5e879470f7436852e2d9686083 (patch) (side-by-side diff) | |
tree | 358bdc16f9948bc954380932fd9d1c92efe4e61b | |
parent | 8269dfa474065b986375de7c4fd380cbda837a12 (diff) | |
download | opie-2a04bf465c332f5e879470f7436852e2d9686083.zip opie-2a04bf465c332f5e879470f7436852e2d9686083.tar.gz opie-2a04bf465c332f5e879470f7436852e2d9686083.tar.bz2 |
BigScreen: don't resize widgets that always visible (for example on bring a widget to front)
-rw-r--r-- | library/qpeapplication.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h index 9ea7e9d..8c85ad0 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h @@ -182,70 +182,75 @@ private: bool reserved_sh; }; inline void QPEApplication::showDialog( QDialog* d, bool nomax ) { showWidget( d, nomax ); } inline int QPEApplication::execDialog( QDialog* d, bool nomax ) { showDialog( d, nomax ); return d->exec(); } #ifdef Q_WS_QWS extern Q_EXPORT QRect qt_maxWindowRect; #endif inline void QPEApplication::showWidget( QWidget* wg, bool nomax ) { + if ( wg->isVisible() ) + wg->show(); + else + { if ( !nomax && ( qApp->desktop()->width() <= 320 ) ) { wg->showMaximized(); } else { #ifdef Q_WS_QWS QSize desk = QSize( qApp->desktop()->width(), qApp->desktop()->height() ); #else QSize desk = QSize( qt_maxWindowRect.width(), qt_maxWindowRect.height() ); #endif QSize sh = wg->sizeHint(); int w = QMAX( sh.width(), wg->width() ); int h = QMAX( sh.height(), wg->height() ); // desktop widget-frame taskbar w = QMIN( w, ( desk.width() - ( wg->frameGeometry().width() - wg->geometry().width() ) - 25 ) ); h = QMIN( h, ( desk.height() - ( wg->frameGeometry().height() - wg->geometry().height() ) - 25 ) ); 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; } inline Transformation DegToTrans ( int d ) { Transformation t = static_cast<Transformation>( d / 90 ); return t; } /* * Set current rotation of Opie, and rotation for newly started apps. * Differs from setDefaultRotation in that 1) it rotates currently running apps, * and 2) does not set deforient or save orientation to qpe.conf. */ inline void QPEApplication::setCurrentRotation( int r ) { // setTransformation has been introduced in Qt/Embedded 2.3.4 snapshots |