Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to get os scale factor #5083

Open
1 task done
Alex25820 opened this issue Mar 14, 2025 · 0 comments
Open
1 task done

Ability to get os scale factor #5083

Alex25820 opened this issue Mar 14, 2025 · 0 comments

Comments

@Alex25820
Copy link

Alex25820 commented Mar 14, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant