feathersui / feathersui-starling

User interface components for Starling Framework and Adobe AIR
https://feathersui.com/learn/as3-starling/
Other
914 stars 386 forks source link

Default scale factor of MetalWorksDesktopTheme? #1809

Closed hoangdung-qbt closed 3 years ago

hoangdung-qbt commented 3 years ago

Hi! Josh. I just found it in https://github.com/BowlerHatLLC/feathersui-starling/blob/master/themes/MetalWorksDesktopTheme/source/feathers/themes/MetalWorksDesktopTheme.as protected static const ATLAS_SCALE_FACTOR:int = 2; I was developing an educational app for teachers that runs on PC and Mac. my app just uses 1x texture. Starling stage is always set to 1138x640px even with full screen mode. I did some test on my PC (2k - 1920 x 1080), everything worked fine. For example:

pickerList.width = 150;
pickerList.height = 30;

The pickerList shows up with correct size!. But my concern is in 4k screen (higher DPI), it will pick 2x textures and the pickerList will be bigger. Correct me if i am wrong. Just my little question about the default scale factor of Feathers themes. It is set to 1 or automatically set to 2 on high resolution screen (4k,8k....)? Thanks in advance.

joshtynjala commented 3 years ago

Starling's scaling system is really smart. Even if the texture's scale factor is not the same as the device's scale factor, that's okay. Starling will ensure that the texture displays at the same size on all device scale factors. How easy Starling makes this is one of my favorite things about the library.