feat: Default to the device pixel ratio
Resolves #205
Description
The pixel ratio will no longer default to 1. Instead, it defaults to the current device' pixel ratio. This should increase the screenshot fidelity.
Checklist
- [ ] I have updated/added tests for ALL new/updated/fixed functionality.
- [ ] I have updated/added relevant documentation and added code (documentation) comments where necessary.
- [ ] I have updated/added relevant examples in
exampleor documentation.
Breaking Change?
Technically, this is a breaking change since it modifies existing behavior. It's not a breaking change in terms of the API. Since it should have only positive effects and no negative effects, I would say this can be considered a non-breaking change.
- [ ] Yes, this PR is a breaking change.
- [x] No, this PR is not a breaking change.
Related Issues
To view this pull requests documentation preview, visit the following URL:
docs.page/abausg/home_widget~304
Documentation is deployed and generated using docs.page.
@ueman this looks like a nice improvement!
It might make sense to add a test to test against 2 different device pixelRatios? This would ensure we are actually using the device's pixel ratio instead of a different hardcoded default value.
Happy to contribute that myself, but don't want to take away from your contribution.
Finally getting around adding this. I'll be treating this as a breaking change as it may have effects on peoples current widget setup!
Thanks for this @ueman
@Peetee06 regarding this:
It might make sense to add a test to test against 2 different device pixelRatios? This would ensure we are actually using the device's pixel ratio instead of a different hardcoded default value.
I think it would be a nice improvement and happy to accept it if you add the test cases :)