Skip to content

Ability to get os scale factor #5083

@Alex25820

Description

@Alex25820

Duplicate Check

Describe the requested feature

I am making an application that requires taking a screenshot of a selected area of the screen. The area is selected by repositioning and resizing the application window, see attached image.

I can get the window size (page.window.width, page.window.height) and position (page.window.left, page.window.top) but these values are not in screen coordinates. They do not take into account the os scale factor.

I can convert them to screen coordinates by multiplying with the scale factor but I have not been able to find any way to get this scale factor in Flet. I can use external libraries to get the scale factor but I would prefer to use Flet since I haven't been able to find any cross platform libraries that can do the job.

Suggest a solution

Add the os scale factor as a variable in Flet if possible.

Screenshots

Image

Additional details

No response

Metadata

Metadata

Assignees

Labels

feature requestSuggestion/Request for additional feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions