From 6c088af0f9677e19447fb42b8a1e0e633664dd2e Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Fri, 31 Aug 2018 23:44:15 +0200 Subject: [PATCH] QHeaderView: honor qss padding attribute QStyleSheetStyle did not check if a border (which includes the padding) is given and therefore the padding attribute given by css was ignored. Only when another attribute was additionally set, the padding was used. Task-number: QTBUG-59501 Change-Id: If3e691a23266ef6d0fb942a43053b29d65e40047 Reviewed-by: Richard Moe Gustavsen --- src/widgets/styles/qstylesheetstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 5ba45d51d3..c2ffcc82b1 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -3870,7 +3870,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q if(hasStyleRule(w, PseudoElement_HeaderViewSection)) { QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection); if (!subRule.hasNativeBorder() || !subRule.baseStyleCanDraw() - || subRule.hasBackground() || subRule.hasPalette() || subRule.hasFont) { + || subRule.hasBackground() || subRule.hasPalette() || subRule.hasFont || subRule.hasBorder()) { ParentStyle::drawControl(ce, opt, p, w); return; }