Fix QDateEdit popup appearance on mac

The WS/OS was obviously incorrect and the hack seems not to be
needed any more.

[ChangeLog][QtWidgets][Mac] Fixed incorrect appearance
of QDateEdit with calendarPopup enabled.

Task-number: QTBUG-36692
Change-Id: Ic62c9993dc13e783c00fcb56f75d92967eb5074d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
Jens Bache-Wiig 2014-02-26 15:07:10 +01:00 committed by The Qt Project
parent 6060dab13a
commit 2a6c50aa26
2 changed files with 1 additions and 7 deletions

View File

@ -5827,12 +5827,6 @@ QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *op
switch (sc) {
case SC_ComboBoxEditField:{
ret = QMacStylePrivate::comboboxEditBounds(combo->rect, bdi);
// hack to posistion the edit feld correctly for QDateTimeEdits
// in calendarPopup mode.
if (qobject_cast<const QDateTimeEdit *>(widget)) {
ret.moveTop(ret.top() - 2);
ret.setHeight(ret.height() +1);
}
break; }
case SC_ComboBoxArrow:{
ret = QMacStylePrivate::comboboxEditBounds(combo->rect, bdi);

View File

@ -993,7 +993,7 @@ QSize QDateTimeEdit::sizeHint() const
QSize hint(w, h);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
if (d->calendarPopupEnabled()) {
QStyleOptionComboBox opt;
d->cachedSizeHint = style()->sizeFromContents(QStyle::CT_ComboBox, &opt, hint, this);