Skip to content

Proposal: Add an option to make device scale factor flexible, in addition to the existing --retina argument #136

@nielthiart

Description

@nielthiart

The --retina argument is convenient to set a device scale factor of 2, but for my use case I needed a variety of scale factors to match other displays.

Ref: #133

For example, Google Pixel 6 has a scale factor of 2.625. Some devices go up to 4.

My proposal is to add an additional argument, --scale-factor, that takes a float as argument, and is None by default.

To avoid confusion when using --retina and --scale-factor simultaneously, we could treat them as mutually exclusive and raise a helpful error. We can also check that the scale factor is positive.

A reusable function that validates and normalises the device scale factor provides the opportunity to validate other scale-factor-altering arguments in the future, such as the --device argument proposed in #129.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions