BUG: 396612
Depends on D18288
Hour hand did not had shadow.
Now it has.
Details
- Reviewers
mart hein ngraham davidedmundson - Group Reviewers
VDG - Commits
- R120:975df8f8930c: Add shadow to Hour's hand
Add new analog clock widget from "Add widget" on right click context menu
Diff Detail
- Repository
- R120 Plasma Workspace
- Branch
- hour
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 6281 Build 6299: arc lint + arc unit
From the linked bug report (and your screenshot)
You're right about the typo, but it doesn't seem that trivial. The shadow shadow appears all offset (on the default breeze theme at least)
The hour hand shadow starts several px below the hour hand
Gotta fix the shadow appearance before we can land this.
If we consider where the light is actually coming from, probably we need for the center part to cast a shadow too.
Well, you open it up in Inkscape and fix it in there. I know that's not particularly helpful, but I can't tell you exactly what you need to do unless you ask me a specific question about how to do something. This might be the wrong approach though. If your goal is simply to make the shadow move with the hand in a way that has a consistent light direction, you'll need to rotate and translate the shadow depending on the time in the code here. I think the light source should be in the top left coming down diagonally to the bottom right since that's how it is for most Breeze icons.
so, the svg is fine, if one removes all anchors.margins the shadows graphics are all beneath the hands exactly.
so can it be tried to just adjust those anchors margins to a small enough value?
The SVG did actually need some tweaking. I've done that at D18288.
After that, I found that setting the hour hand shadow's topMargin to -6 and changing the second hand's topMargin to 2 looked great:
@ngraham I will put those changes in effect, but will need you to push those changes first.
- Set the hour hand shadow's topMargin to -6px and second hand shadow's topMargin to 2px
- Use units.smallSpacing instead of hardcoding the values
units.smallSpacing * [some value]
I'm afraid this won't work, since it will result in fractional pixel values and blurry edges. For this, you need to just hardcode the number of pixels.