D19743: FrameSvgItem: catch margin changes of FrameSvg also outside own methods
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Wed Mar 13 23:30:02 GMT 2019
kossebau created this revision.
kossebau added reviewers: Plasma, mart.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
kossebau requested review of this revision.
REVISION 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.
REPOSITORY
R242 Plasma Framework (Library)
BRANCH
catchSvgFrameMarginChangesOnThemeChange
REVISION DETAIL
https://phabricator.kde.org/D19743
AFFECTED FILES
src/declarativeimports/core/framesvgitem.cpp
src/declarativeimports/core/framesvgitem.h
To: kossebau, #plasma, mart
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190313/40df8362/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list