author | mickeyl <mickeyl> | 2005-04-19 13:27:29 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-04-19 13:27:29 (UTC) |
commit | 6ec538f7e4a84e4f76addaf558c415b7dffc659b (patch) (unidiff) | |
tree | 78690e386746d111033f22e997915ab537a5c350 /library | |
parent | 9b8dd642c4b135070911c78bb5d31a7add7162ee (diff) | |
download | opie-6ec538f7e4a84e4f76addaf558c415b7dffc659b.zip opie-6ec538f7e4a84e4f76addaf558c415b7dffc659b.tar.gz opie-6ec538f7e4a84e4f76addaf558c415b7dffc659b.tar.bz2 |
fix windowing on c7x0 - patch from OE
-rw-r--r-- | library/widget_showing.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/widget_showing.cpp b/library/widget_showing.cpp index ee63759..e43a16a 100644 --- a/library/widget_showing.cpp +++ b/library/widget_showing.cpp | |||
@@ -7,73 +7,73 @@ | |||
7 | .>+-= | 7 | .>+-= |
8 | _;:, .> :=|. This library is free software; you can | 8 | _;:, .> :=|. This library is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This library is distributed in the hope that | 15 | .i_,=:_. -<s. This library is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
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 | #ifndef OPIE_NO_WINDOWED | 55 | #ifdef OPIE_NO_WINDOWED |
56 | Q_UNUSED( nomax ) | 56 | Q_UNUSED( nomax ) |
57 | if ( TRUE ) { | 57 | if ( TRUE ) { |
58 | #else | 58 | #else |
59 | if ( !nomax | 59 | if ( !nomax |
60 | && ( qApp->desktop()->width() <= 320 ) ){ | 60 | && ( qApp->desktop()->width() <= 320 ) ){ |
61 | #endif | 61 | #endif |
62 | wg->showMaximized(); | 62 | wg->showMaximized(); |
63 | } else { | 63 | } else { |
64 | #ifdef Q_WS_QWS | 64 | #ifdef Q_WS_QWS |
65 | QSize desk = QSize( qApp->desktop()->width(), qApp->desktop()->height() ); | 65 | QSize desk = QSize( qApp->desktop()->width(), qApp->desktop()->height() ); |
66 | #else | 66 | #else |
67 | QSize desk = QSize( qt_maxWindowRect.width(), qt_maxWindowRect.height() ); | 67 | QSize desk = QSize( qt_maxWindowRect.width(), qt_maxWindowRect.height() ); |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | QSize sh = wg->sizeHint(); | 70 | QSize sh = wg->sizeHint(); |
71 | int w = QMAX( sh.width(), wg->width() ); | 71 | int w = QMAX( sh.width(), wg->width() ); |
72 | int h = QMAX( sh.height(), wg->height() ); | 72 | int h = QMAX( sh.height(), wg->height() ); |
73 | // desktop widget-frame taskbar | 73 | // desktop widget-frame taskbar |
74 | w = QMIN( w, ( desk.width() - ( wg->frameGeometry().width() - wg->geometry().width() ) - 25 ) ); | 74 | 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 ) ); | 75 | h = QMIN( h, ( desk.height() - ( wg->frameGeometry().height() - wg->geometry().height() ) - 25 ) ); |
76 | wg->resize( w, h ); | 76 | wg->resize( w, h ); |
77 | wg->show(); | 77 | wg->show(); |
78 | } | 78 | } |
79 | } | 79 | } |