Skip to content

Scaling widgets to screen densityΒ #293

@hilaire

Description

@hilaire

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions