home_widget icon indicating copy to clipboard operation
home_widget copied to clipboard

feat: Default to the device pixel ratio

Open ueman opened this issue 1 year ago • 1 comments

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 example or 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

ueman avatar Oct 02 '24 17:10 ueman

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.

docs-page[bot] avatar Oct 02 '24 17:10 docs-page[bot]

@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.

Peetee06 avatar Nov 23 '24 16:11 Peetee06

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

ABausG avatar May 20 '25 20:05 ABausG

@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 :)

ABausG avatar May 20 '25 20:05 ABausG