author | erik <erik> | 2007-01-19 01:15:31 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-19 01:15:31 (UTC) |
commit | ac0ce844e90a64247c0adb210e0a23021b011d57 (patch) (unidiff) | |
tree | 1fd3b8d0c24d8f2054ed45e7e2e102f940343462 /library/widget_showing.cpp | |
parent | 1ab92f1d2b346de7da8ca5c3aaa6bc75b43981e7 (diff) | |
download | opie-ac0ce844e90a64247c0adb210e0a23021b011d57.zip opie-ac0ce844e90a64247c0adb210e0a23021b011d57.tar.gz opie-ac0ce844e90a64247c0adb210e0a23021b011d57.tar.bz2 |
Commit of Paul's patch to remove a macro and substitute it with a
class variable.
-rw-r--r-- | library/widget_showing.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/library/widget_showing.cpp b/library/widget_showing.cpp index e43a16a..cc1bfb2 100644 --- a/library/widget_showing.cpp +++ b/library/widget_showing.cpp | |||
@@ -31,49 +31,44 @@ | |||
31 | 31 | ||
32 | #include <qtopia/qpeapplication.h> | 32 | #include <qtopia/qpeapplication.h> |
33 | 33 | ||
34 | #ifdef Q_WS_QWS | 34 | #ifdef Q_WS_QWS |
35 | extern Q_EXPORT QRect qt_maxWindowRect; | 35 | extern Q_EXPORT QRect qt_maxWindowRect; |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | void QPEApplication::showDialog( QDialog* d, bool nomax ) | 38 | void QPEApplication::showDialog( QDialog* d, bool nomax ) |
39 | { | 39 | { |
40 | showWidget( d, nomax ); | 40 | showWidget( d, nomax ); |
41 | } | 41 | } |
42 | 42 | ||
43 | int QPEApplication::execDialog( QDialog* d, bool nomax ) | 43 | int QPEApplication::execDialog( QDialog* d, bool nomax ) |
44 | { | 44 | { |
45 | showDialog( d, nomax ); | 45 | showDialog( d, nomax ); |
46 | return d->exec(); | 46 | return d->exec(); |
47 | } | 47 | } |
48 | 48 | ||
49 | void QPEApplication::showWidget( QWidget* wg, bool nomax ) { | 49 | void QPEApplication::showWidget( QWidget* wg, bool nomax ) { |
50 | if ( wg->isVisible() ) { | 50 | if ( wg->isVisible() ) { |
51 | wg->show(); | 51 | wg->show(); |
52 | return; | 52 | return; |
53 | } | 53 | } |
54 | 54 | ||
55 | #ifdef OPIE_NO_WINDOWED | 55 | if ( !isSaveWindowsPos() || (!nomax |
56 | Q_UNUSED( nomax ) | 56 | && ( qApp->desktop()->width() <= 30 )) ){ |
57 | if ( TRUE ) { | ||
58 | #else | ||
59 | if ( !nomax | ||
60 | && ( qApp->desktop()->width() <= 320 ) ){ | ||
61 | #endif | ||
62 | wg->showMaximized(); | 57 | wg->showMaximized(); |
63 | } else { | 58 | } else { |
64 | #ifdef Q_WS_QWS | 59 | #ifdef Q_WS_QWS |
65 | QSize desk = QSize( qApp->desktop()->width(), qApp->desktop()->height() ); | 60 | QSize desk = QSize( qApp->desktop()->width(), qApp->desktop()->height() ); |
66 | #else | 61 | #else |
67 | QSize desk = QSize( qt_maxWindowRect.width(), qt_maxWindowRect.height() ); | 62 | QSize desk = QSize( qt_maxWindowRect.width(), qt_maxWindowRect.height() ); |
68 | #endif | 63 | #endif |
69 | 64 | ||
70 | QSize sh = wg->sizeHint(); | 65 | QSize sh = wg->sizeHint(); |
71 | int w = QMAX( sh.width(), wg->width() ); | 66 | int w = QMAX( sh.width(), wg->width() ); |
72 | int h = QMAX( sh.height(), wg->height() ); | 67 | int h = QMAX( sh.height(), wg->height() ); |
73 | // desktop widget-frame taskbar | 68 | // desktop widget-frame taskbar |
74 | w = QMIN( w, ( desk.width() - ( wg->frameGeometry().width() - wg->geometry().width() ) - 25 ) ); | 69 | w = QMIN( w, ( desk.width() - ( wg->frameGeometry().width() - wg->geometry().width() ) - 25 ) ); |
75 | h = QMIN( h, ( desk.height() - ( wg->frameGeometry().height() - wg->geometry().height() ) - 25 ) ); | 70 | h = QMIN( h, ( desk.height() - ( wg->frameGeometry().height() - wg->geometry().height() ) - 25 ) ); |
76 | wg->resize( w, h ); | 71 | wg->resize( w, h ); |
77 | wg->show(); | 72 | wg->show(); |
78 | } | 73 | } |
79 | } | 74 | } |