D20112: [analog-clock] Allow themes to define hand shadow offset & hand rot center
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Mon Apr 8 21:35:57 BST 2019
kossebau added a comment.
Looking around on store.kde.org, I saw quite some clocks of (old) themes which have hands that are e.g. only indicators directly at the border. Or are ghost-like pointers floating disconnected from the center.
They usually compensate by having an empty region until the center (or beyond, to make up for the currently hardcoded (width/2, width/2) rotation center offset).
With some old themes, it appears even that in early Plasma times the vertical offset from the middle of the hand shape was used (cmp. e.g. clock of Spoons lite: https://store.kde.org/p/998821/)
To test the new variant to define the rotation offset, please get the current working version of Spoons dark:
cd some/test/dir
git clone git://anongit.kde.org/scratch/ivan/plasma-theme-spoons-dark.git
cd .local/share/plasma/desktoptheme
ln -s some/test/dir/plasma-theme-spoons-dark spoons-dark-work
Open `widgets/clock.svg` and add this before the final `</svg>:
<circle
style="opacity:0.875;fill:#008000;fill-opacity:1;stroke:none"
id="hint-hourhand-rotation-center-offset"
r="2"
cx="71.566"
cy="62.5" />
<circle
style="opacity:0.875;fill:#008000;fill-opacity:1;stroke:none"
id="hint-minutehand-rotation-center-offset"
r="2"
cx="63.908"
cy="62.5" />
<circle
style="opacity:0.875;fill:#008000;fill-opacity:1;stroke:none"
id="hint-secondhand-rotation-center-offset"
r="2"
cx="56.250"
cy="62.5" />
The result would look like this in Inkscape:
F6759682: Screenshot_20190408_223047.png <https://phabricator.kde.org/F6759682>
And this patch then results in this at runtime:
F6759679: Screenshot_20190408_222812.png <https://phabricator.kde.org/F6759679>
REPOSITORY
R120 Plasma Workspace
BRANCH
fixclockshadowhandcenter
REVISION DETAIL
https://phabricator.kde.org/D20112
To: kossebau, #plasma, #vdg, mart, davidedmundson, ngraham
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190408/e76cfb3d/attachment-0001.html>
More information about the Plasma-devel
mailing list