D28038: Fix enabling border for ShadowedRectangle on item creation
Arjen Hiemstra
noreply at phabricator.kde.org
Fri Mar 13 17:43:32 GMT 2020
ahiemstra created this revision.
ahiemstra added a reviewer: Kirigami.
Herald added a project: Kirigami.
Herald added a subscriber: plasma-devel.
ahiemstra requested review of this revision.
REVISION SUMMARY
When enabling the border during object creation, the first time updatePaintNode
would be called we'd call setBorderWidth() which switches the node to the bordered
rectangle material, then tries to set the border width, which fails because we have
no geometry rect yet. This splits up setBorderWidth into setBorderEnabled and
setBorderWidth so we can call setBorderEnabled as first thing and setBorderWidth
once a proper rect has been set.
In addition, this also changes the behaviour of border to be completely contained
within the item, to match QtQuick Rectangle behaviour.
TEST PLAN
D28029 <https://phabricator.kde.org/D28029> now works properly.
REPOSITORY
R169 Kirigami
BRANCH
shadowedrectangle_border
REVISION DETAIL
https://phabricator.kde.org/D28038
AFFECTED FILES
src/scenegraph/shadowedborderrectangle.frag
src/scenegraph/shadowedborderrectangle_core.frag
src/scenegraph/shadowedrectanglenode.cpp
src/scenegraph/shadowedrectanglenode.h
src/shadowedrectangle.cpp
To: ahiemstra, #kirigami
Cc: plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200313/8c8c694a/attachment.html>
More information about the Plasma-devel
mailing list