Changeset 561 for trunk/src/gui/widgets/qtoolbarlayout.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/gui/widgets/qtoolbarlayout.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtGui module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 129 129 if (!set) { 130 130 QObject::connect(extension, SIGNAL(clicked(bool)), 131 this, SLOT(setExpanded(bool)) );131 this, SLOT(setExpanded(bool)), Qt::UniqueConnection); 132 132 extension->setPopupMode(QToolButton::DelayedPopup); 133 133 extension->setMenu(0); … … 335 335 if (mw->unifiedTitleAndToolBarOnMac() 336 336 && mw->toolBarArea(static_cast<QToolBar *>(parentWidget())) == Qt::TopToolBarArea) { 337 if ( that->expandFlag) {337 if (expandFlag) { 338 338 tb->setMaximumSize(0xFFFFFF, 0xFFFFFF); 339 339 } else { … … 361 361 QStyleOptionToolBar opt; 362 362 tb->initStyleOption(&opt); 363 const int handleExtent = movable()364 ? style->pixelMetric(QStyle::PM_ToolBarHandleExtent, &opt, tb) : 0;365 363 const int margin = this->margin(); 366 364 const int extensionExtent = style->pixelMetric(QStyle::PM_ToolBarExtensionExtent, &opt, tb); … … 368 366 369 367 QLayout::setGeometry(rect); 370 if (movable()) {371 if (o == Qt::Horizontal) {372 handRect = QRect(margin, margin, handleExtent, rect.height() - 2*margin);373 handRect = QStyle::visualRect(parentWidget()->layoutDirection(), rect, handRect);374 } else {375 handRect = QRect(margin, margin, rect.width() - 2*margin, handleExtent);376 }377 } else {378 handRect = QRect();379 }380 368 381 369 bool ranOutOfSpace = false; … … 667 655 return; 668 656 if (QMainWindow *win = qobject_cast<QMainWindow*>(tb->parentWidget())) { 669 animating = true;657 animating = !tb->isWindow() && win->isAnimated(); 670 658 QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout()); 671 659 if (expanded) { … … 678 666 } 679 667 } 680 layout->layoutState.toolBarAreaLayout.apply( true);668 layout->layoutState.toolBarAreaLayout.apply(animating); 681 669 } 682 670 } … … 743 731 } 744 732 745 QRect QToolBarLayout::handleRect() const746 {747 return handRect;748 }749 750 733 QT_END_NAMESPACE 751 734
Note:
See TracChangeset
for help on using the changeset viewer.