Changeset 846 for trunk/src/gui/itemviews/qitemdelegate.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/itemviews/qitemdelegate.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 70 70 #include <qlocale.h> 71 71 #include <qdialog.h> 72 #include <qmath.h> 72 73 73 74 #include <limits.h> … … 667 668 Q_D(const QItemDelegate); 668 669 669 QPen pen = painter->pen();670 670 QPalette::ColorGroup cg = option.state & QStyle::State_Enabled 671 671 ? QPalette::Normal : QPalette::Disabled; … … 1024 1024 static QString qPixmapSerial(quint64 i, bool enabled) 1025 1025 { 1026 ushort arr[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '-', '0' + enabled};1026 ushort arr[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '-', ushort('0' + enabled) }; 1027 1027 ushort *ptr = &arr[16]; 1028 1028 … … 1149 1149 d->textLayout.setFont(font); 1150 1150 d->textLayout.setText(QItemDelegatePrivate::replaceNewLine(text)); 1151 const QSize size = d->doTextLayout(rect.width()).toSize(); 1151 QSizeF fpSize = d->doTextLayout(rect.width()); 1152 const QSize size = QSize(qCeil(fpSize.width()), qCeil(fpSize.height())); 1152 1153 // ###: textRectangle should take style option as argument 1153 1154 const int textMargin = QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1;
Note:
See TracChangeset
for help on using the changeset viewer.