Styles: improve SH_Header_ArrowAlignment handling
The docs were wrong, and the returned values from some styles did not match reality, so fix that. Again, this style hint was not used at all within QWidgets... Task-number: QTBUG-629 Change-Id: Ie6ff80fd09bc3292ba3d787ccca4d6f4c0056e89 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
This commit is contained in:
parent
1b548faa77
commit
b5f8502c12
@ -4907,10 +4907,13 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
|
||||
|
||||
|
||||
case SH_TabBar_Alignment:
|
||||
case SH_Header_ArrowAlignment:
|
||||
ret = Qt::AlignLeft;
|
||||
break;
|
||||
|
||||
case SH_Header_ArrowAlignment:
|
||||
ret = Qt::AlignRight | Qt::AlignVCenter;
|
||||
break;
|
||||
|
||||
case SH_TitleBar_AutoRaise:
|
||||
ret = false;
|
||||
break;
|
||||
|
@ -1663,7 +1663,8 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
|
||||
|
||||
\value SH_Header_ArrowAlignment The placement of the sorting
|
||||
indicator may appear in list or table headers. Possible values
|
||||
are Qt::Left or Qt::Right.
|
||||
are Qt::Alignment values (that is, an OR combination of
|
||||
Qt::AlignmentFlag flags).
|
||||
|
||||
\value SH_Slider_SnapToValue Sliders snap to values while moving,
|
||||
as they do on Windows.
|
||||
|
@ -2112,6 +2112,9 @@ int QWindowsVistaStyle::styleHint(StyleHint hint, const QStyleOption *option, co
|
||||
else
|
||||
ret = -1;
|
||||
break;
|
||||
case SH_Header_ArrowAlignment:
|
||||
ret = Qt::AlignTop | Qt::AlignHCenter;
|
||||
break;
|
||||
default:
|
||||
ret = QWindowsXPStyle::styleHint(hint, option, widget, returnData);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user