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

Scaling widgets to screen density #293

Open
hilaire opened this issue Aug 31, 2024 · 0 comments
Open

Scaling widgets to screen density #293

hilaire opened this issue Aug 31, 2024 · 0 comments

Comments

@hilaire
Copy link

hilaire commented Aug 31, 2024

Depending on the user selected defaultPointSize, the developer of GUI application should be able to scale their widgets accordingly.

For Dr. Geo I added these two methods to the Theme class, but it should be a system solution because I will have clash when mixing GUI applications code in a single Cuis image:

Theme>>scaled: aFloat
" Scale the length represented by anInteger to the display density "
	^ aFloat * FontFamily defaultPointSize / 12

and

scale: anIntegerOrCollection
" Scale the length represented by anInteger to the display density "
	^ (self scaled: anIntegerOrCollection) rounded
@hilaire hilaire changed the title Scale Scaling widget to screen density Aug 31, 2024
@hilaire hilaire changed the title Scaling widget to screen density Scaling widgets to screen density Aug 31, 2024
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