author | llornkcor <llornkcor> | 2004-04-25 08:54:30 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-04-25 08:54:30 (UTC) |
commit | 5d3c80f70109bee75d55db2a11d7112eb7ebaa99 (patch) (side-by-side diff) | |
tree | 4215d0bce8d8b270cead8afa829e59da173ae63f /library/qpeapplication.cpp | |
parent | ea4380df897798cf4bbadaf786868a18b3dee975 (diff) | |
download | opie-5d3c80f70109bee75d55db2a11d7112eb7ebaa99.zip opie-5d3c80f70109bee75d55db2a11d7112eb7ebaa99.tar.gz opie-5d3c80f70109bee75d55db2a11d7112eb7ebaa99.tar.bz2 |
remove commented out ugly hack
-rw-r--r-- | library/qpeapplication.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 5ce3011..10c6c40 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -198,73 +198,48 @@ public: } } else { qpe_show_dialog((QDialog*)mw,nomaximize); } } else { if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) { mw->resize(s); mw->move(p); } else { //no stored rectangle, make an estimation int x = (qApp->desktop()->width()-mw->frameGeometry().width())/2; int y = (qApp->desktop()->height()-mw->frameGeometry().height())/2; mw->move( QMAX(x,0), QMAX(y,0) ); #ifdef Q_WS_QWS if ( !nomaximize ) mw->showMaximized(); #endif } if ( max && !nomaximize ) mw->showMaximized(); else mw->show(); } } } -// // ugly hack, remove that later after finding a sane solution -// // Addendum: Only Sharp currently has models with high resolution but (physically) small displays, -// // so this is only useful if QT_QWS_SIMPAD is NOT defined. E.g. SIMpad has 800x600 but has -// // a (physically) large enough display to use the small icons -// #if defined(OPIE_HIGH_RES_SMALL_PHY) -// if ( QPEApplication::desktop() ->width() >= 600 && ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) ) { -// ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true ); -// } -// #endif - -// if ( mw->layout() && mw->inherits("QDialog") ) { -// QPEApplication::showDialog((QDialog*)mw, nomaximize); -// } -// else { -// #ifdef Q_WS_QWS -// if ( !nomaximize ) { -// qDebug("QDialog special case XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); -// mw->showMaximized(); -// // QPEApplication::showWidget( mw, !nomaximize ); -// } else -// #endif -// mw->show(); -// } -// } - static void qpe_show_dialog( QDialog* d, bool nomax ) { QSize sh = d->sizeHint(); int w = QMAX(sh.width(),d->width()); int h = QMAX(sh.height(),d->height()); if ( d->parentWidget() && !d->parentWidget()->topLevelWidget()->isMaximized() ) nomax = TRUE; #ifndef Q_WS_QWS QSize s(qApp->desktop()->width(), qApp->desktop()->height() ); #else QSize s(qt_maxWindowRect.width(), qt_maxWindowRect.height() ); #endif int maxX = s.width() - (d->frameGeometry().width() - d->geometry().width()); int maxY = s.height() - (d->frameGeometry().height() - d->geometry().height()); if ( (w >= maxX && h >= maxY) || ( (!nomax) && ( w > s.width()*3/4 || h > s.height()*3/4 ) ) ) { d->showMaximized(); } else { // try centering the dialog around its parent QPoint p(0,0); |