summaryrefslogtreecommitdiff
path: root/library/widget_showing.cpp
Unidiff
Diffstat (limited to 'library/widget_showing.cpp') (more/less context) (show whitespace changes)
-rw-r--r--library/widget_showing.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/widget_showing.cpp b/library/widget_showing.cpp
index 43ece64..43d19b0 100644
--- a/library/widget_showing.cpp
+++ b/library/widget_showing.cpp
@@ -31,44 +31,48 @@
31 31
32#include <qtopia/qpeapplication.h> 32#include <qtopia/qpeapplication.h>
33 33
34#ifdef Q_WS_QWS 34#ifdef Q_WS_QWS
35extern Q_EXPORT QRect qt_maxWindowRect; 35extern Q_EXPORT QRect qt_maxWindowRect;
36#endif 36#endif
37 37
38void QPEApplication::showDialog( QDialog* d, bool nomax ) 38void QPEApplication::showDialog( QDialog* d, bool nomax )
39{ 39{
40 showWidget( d, nomax ); 40 showWidget( d, nomax );
41} 41}
42 42
43int QPEApplication::execDialog( QDialog* d, bool nomax ) 43int 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
49void QPEApplication::showWidget( QWidget* wg, bool nomax ) { 49void 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
56 if ( TRUE ) {
57#else
55 if ( !nomax 58 if ( !nomax
56 && ( qApp->desktop()->width() <= 320 ) ){ 59 && ( qApp->desktop()->width() <= 320 ) ){
60#endif
57 wg->showMaximized(); 61 wg->showMaximized();
58 } else { 62 } else {
59#ifdef Q_WS_QWS 63#ifdef Q_WS_QWS
60 QSize desk = QSize( qApp->desktop()->width(), qApp->desktop()->height() ); 64 QSize desk = QSize( qApp->desktop()->width(), qApp->desktop()->height() );
61#else 65#else
62 QSize desk = QSize( qt_maxWindowRect.width(), qt_maxWindowRect.height() ); 66 QSize desk = QSize( qt_maxWindowRect.width(), qt_maxWindowRect.height() );
63#endif 67#endif
64 68
65 QSize sh = wg->sizeHint(); 69 QSize sh = wg->sizeHint();
66 int w = QMAX( sh.width(), wg->width() ); 70 int w = QMAX( sh.width(), wg->width() );
67 int h = QMAX( sh.height(), wg->height() ); 71 int h = QMAX( sh.height(), wg->height() );
68// desktop widget-frame taskbar 72// desktop widget-frame taskbar
69 w = QMIN( w, ( desk.width() - ( wg->frameGeometry().width() - wg->geometry().width() ) - 25 ) ); 73 w = QMIN( w, ( desk.width() - ( wg->frameGeometry().width() - wg->geometry().width() ) - 25 ) );
70 h = QMIN( h, ( desk.height() - ( wg->frameGeometry().height() - wg->geometry().height() ) - 25 ) ); 74 h = QMIN( h, ( desk.height() - ( wg->frameGeometry().height() - wg->geometry().height() ) - 25 ) );
71 wg->resize( w, h ); 75 wg->resize( w, h );
72 wg->show(); 76 wg->show();
73 } 77 }
74} 78}