Fix widget borders when using global stylesheetstyle
Recent fixes to stylesheetstyle caused not calling fixupBorder() when globalStyleSheetStyle is used. Task-number: QTBUG-27651 Change-Id: I73263c951e2db7d574e81da3f60a1b79f3852716 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
parent
b5d55f3a35
commit
82cb34b05f
@ -997,16 +997,12 @@ QRenderRule::QRenderRule(const QVector<Declaration> &declarations, const QObject
|
||||
}
|
||||
}
|
||||
|
||||
if (object) {
|
||||
if (const QWidget *widget = qobject_cast<const QWidget *>(object)) {
|
||||
QStyleSheetStyle *style = const_cast<QStyleSheetStyle *>(globalStyleSheetStyle);
|
||||
if (!style) {
|
||||
if (const QWidget *widget = qobject_cast<const QWidget *>(object)) {
|
||||
style = qobject_cast<QStyleSheetStyle *>(widget->style());
|
||||
if (style)
|
||||
fixupBorder(style->nativeFrameWidth(widget));
|
||||
}
|
||||
}
|
||||
|
||||
if (!style)
|
||||
style = qobject_cast<QStyleSheetStyle *>(widget->style());
|
||||
if (style)
|
||||
fixupBorder(style->nativeFrameWidth(widget));
|
||||
}
|
||||
if (hasBorder() && border()->hasBorderImage())
|
||||
defaultBackground = QBrush();
|
||||
|
Loading…
Reference in New Issue
Block a user