Cuis-Smalltalk-Dev
Cuis-Smalltalk-Dev copied to clipboard
Scaling widgets to screen density
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