FrameSvgItem: catch margin changes of FrameSvg also outside own methods

Authored by kossebau on Mar 13 2019, 11:21 PM.

Description

FrameSvgItem: catch margin changes of FrameSvg also outside own methods

Summary:
FrameSvg updates the margins e.g. on a Theme change already in its
internal event handling before the methods of FrameSvgItem are invoked.
Due to that CheckMarginsChange guards before this change could not detect
any changes, and thus missed to trigger an update via the margin objects
to the QtQuick world.

So when changing the theme e.g. in a Plasma shell or in the Plasma Theme
Explorer, existing FrameSvg items are using outdated margins, resulting
in broken display.

By keeping a copy of the last seen margins as part of the item and not only
per method, changes outside the FrameSvgItem items can be properly detected.

Test Plan:
Switch Plasma themes between Air, Breeze & Oxygen, see how different margins
are reflected in the widgets sizes instantly.
Switch Plasma themes in the Plasma Theme Explorer, with "Show Margins"
enabled, see how margins are always correctly updated intead of taking the
value of the last theme used.

Reviewers: Plasma, mart

Reviewed By: Plasma, mart

Subscribers: kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D19743

Details

Committed
kossebauMar 22 2019, 10:32 AM
Reviewer
Plasma
Differential Revision
D19743: FrameSvgItem: catch margin changes of FrameSvg also outside own methods
Parents
R242:fb1a332948e3: Add Theme::blurBehindEnabled()
Branches
Unknown
Tags
Unknown