PowerToys
PowerToys copied to clipboard
[AlwaysOnTop] Corners scaling
Summary of the Pull Request
Consider scaling for round corners.
PR Checklist
- [x] Closes: #19484
- [ ] Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
- [ ] Tests: Added/updated and all pass
- [ ] Localization: All end user facing strings can be localized
- [ ] Dev docs: Added/updated
- [ ] New binaries: Added on the required places
- [ ] JSON for signing for new binaries
- [ ] WXS for installer for new binaries and localization folder
- [ ] YML for CI pipeline for new test projects
- [ ] YML for signed pipeline
- [ ] Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
Got a screenshot? 🙂
Where, in this all, is the display dpi/scaling factor being applied?
Hey @Jay-o-Way, sorry for the delay, and thanks for the comments. I've updated the code considering them, please take a look on the result.
Here you can see corners with different scaling.
Thanks. I see the radius is proper now. Just a small gap between the window border and the aot border. I'm guessing that's what the +1 and -1 were for. Also see the pixels in the curve are quite sharp, but that's a small thing. (#20467) Did you try very thick borders too? Would love to see that.
And dragging a window from one window to another (with different dpi) works?
Changing DPI for a window works, AOT considers the current scaling of the window.
Here are thick borders as you requested:
Looking good!
P.S. In the last image (with yellow borders) I do not see a gap between the window and the AOT border. Is that because you made an adjustment, or because the colored border thickens both "outward" and "inward"? If I am correct (?) RoundedRect
draws the border over a centralized line. That's why I thought of adding +halfthickness
to left/top/right/bottom and radius.
Good to merge?
Is that because you made an adjustment
Yea, I did an adjustment.
If I am correct (?)
RoundedRect
draws the border over a centralized line. That's why I thought of adding+halfthickness
to left/top/right/bottom and radius.
You're correct, the border is centralized. But in this case, we need to subtract half thickness.
Here is how it looks with half-thickness subtracted.
I don't understand. The radius of the aot border should be larger then the window border. Right? I would expect that every curve has the same center:
pink = current outer radius = window radius black = expected outer radius (window radius + halfthickness) yellow = line to draw on (edge + halfthickness)
I don't understand. The radius of the aot border should be larger then the window border. Right? I would expect that every curve has the same center:
So you expect it to be as it was before?
IMO now it looks ok and not worth changing.
I think the yellow one is prettier, yes. But I guess that's personal. I'm curious for a third opinion...
I think the yellow one is prettier, yes. But I guess that's personal. I'm curious for a third opinion...
Without getting into details, just looking into the pictures, yellow does look better to me too