Changeset 769 for trunk/src/gui/dialogs/qdialog.cpp
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/dialogs/qdialog.cpp
r651 r769 70 70 # include "qcolordialog.h" 71 71 # include "qwizard.h" 72 # include "qmenubar.h"73 72 #endif 74 73 … … 416 415 } 417 416 #else 418 if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize )) 419 adjustPosition(parentWidget()); 417 if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize )) { 418 if (!testAttribute(Qt::WA_Moved)) { 419 Qt::WindowStates state = windowState(); 420 adjustPosition(parentWidget()); 421 setAttribute(Qt::WA_Moved, false); // not really an explicit position 422 if (state != windowState()) 423 setWindowState(state); 424 } 425 } 420 426 #endif 421 427 return result; … … 523 529 524 530 #ifdef Q_OS_SYMBIAN 525 #ifndef QT_NO_MENUBAR526 QMenuBar *menuBar = 0;527 if (!findChild<QMenuBar *>())528 menuBar = new QMenuBar(this);529 #endif530 531 531 if (qobject_cast<QFileDialog *>(this) || qobject_cast<QFontDialog *>(this) || 532 532 qobject_cast<QColorDialog *>(this) || qobject_cast<QWizard *>(this)) … … 560 560 #endif //QT_NO_MENUBAR 561 561 #endif //Q_WS_WINCE_WM 562 #ifdef Q_OS_SYMBIAN563 #ifndef QT_NO_MENUBAR564 else if (menuBar)565 delete menuBar;566 #endif //QT_NO_MENUBAR567 #endif //Q_OS_SYMBIAN568 569 562 return res; 570 563 } … … 808 801 { 809 802 if (!event->spontaneous() && !testAttribute(Qt::WA_Moved)) { 810 803 Qt::WindowStates state = windowState(); 811 804 adjustPosition(parentWidget()); 812 805 setAttribute(Qt::WA_Moved, false); // not really an explicit position 813 814 806 if (state != windowState()) 807 setWindowState(state); 815 808 } 816 809 } … … 912 905 cbaHeight = qt_TSize2QSize(bgContainer->Size()).height(); 913 906 } 914 p.setY(S60->screenHeightInPixels -height()-cbaHeight);907 p.setY(S60->screenHeightInPixels - height() - cbaHeight); 915 908 p.setX(0); 916 909 } else { 917 910 const int scrollbarWidth = style()->pixelMetric(QStyle::PM_ScrollBarExtent); 918 TRect cbaRect = TRect(); 919 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, cbaRect); 920 AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation(); 921 switch (cbaLocation) { 922 case AknLayoutUtils::EAknCbaLocationBottom: 923 p.setY(S60->screenHeightInPixels - height()-cbaRect.Height()); 924 p.setX((S60->screenWidthInPixels - width())>>1); 925 break; 926 case AknLayoutUtils::EAknCbaLocationRight: 927 p.setY((S60->screenHeightInPixels - height())>>1); 928 p.setX(qMax(0,S60->screenWidthInPixels-width()-scrollbarWidth-cbaRect.Width())); 929 break; 930 case AknLayoutUtils::EAknCbaLocationLeft: 931 p.setY((S60->screenHeightInPixels - height())>>1); 932 p.setX(qMax(0,scrollbarWidth+cbaRect.Width())); 933 break; 911 TRect staConTopRect = TRect(); 912 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, staConTopRect); 913 if (staConTopRect.IsEmpty()) { 914 TRect cbaRect = TRect(); 915 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, cbaRect); 916 AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation(); 917 switch (cbaLocation) { 918 case AknLayoutUtils::EAknCbaLocationBottom: 919 p.setY(S60->screenHeightInPixels - height() - cbaRect.Height()); 920 p.setX((S60->screenWidthInPixels - width()) >> 1); 921 break; 922 case AknLayoutUtils::EAknCbaLocationRight: 923 p.setY((S60->screenHeightInPixels - height()) >> 1); 924 p.setX(qMax(0,S60->screenWidthInPixels - width() - scrollbarWidth - cbaRect.Width())); 925 break; 926 case AknLayoutUtils::EAknCbaLocationLeft: 927 p.setY((S60->screenHeightInPixels - height()) >> 1); 928 p.setX(qMax(0,scrollbarWidth + cbaRect.Width())); 929 break; 930 } 931 } else { 932 p.setY((S60->screenHeightInPixels - height()) >> 1); 933 p.setX(qMax(0,S60->screenWidthInPixels - width())); 934 934 } 935 935 }
Note:
See TracChangeset
for help on using the changeset viewer.