Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 2 Support (Qt 5) › Screen density on Surface Pro 4

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13137

    Megan

    Hello!  I am developing on a Surface Pro 4 (Windows 10) which has high pixel density.  The scaling is only set to .25 though.  Is there a way to detect and correct?

     

    From the application logs:

    VPlayApplication: read Screen infos – size: QSize(2736, 1824) , availableSize: QSize(2736, 1744) QRect(0,0 2736×1744) QSize(2736, 1744) QRect(0,0 2736×1744) QRect(0,0 2736×1824) physcislDotsPerInch (might not be accurate): 267.544 , logicalDotsPerInch: 192 , physicalSize [mm] (might not be accurate depending on platform): QSizeF(260, 173)

    setting extrafileSelectorList to (“hd2”, “hd”, “sd”) , allFileSelectors: (“hd2”, “hd”, “sd”, “en_US”, “windows”, “winnt”)

    setting internalContentScaleFactorForImages which is used for MultiResolutionImage contextProperty to 0.25

    VPlayApplication: setting screenDpi contextProperty to 192

    VPlayApplication: setting devicePixelRatio contextProperty to 1

    #13140

    Günther
    Felgo Team

    Hi Megan!

    If you are referring to the log output:
    “setting internalContentScaleFactorForImages which is used for MultiResolutionImage contextProperty to 0.25”
    This means that when using a MultiResolutionImage that provides dynamic image switching, the best quality (+hd2) is used. The hd2 image would be quadruple the size of the sd version, thus the scale of 0.25 is applied to get the same final size in your UI, while still using the better image.

    Designing your UI to look nice on all devices (no matter the resolution or pixel density) is another matter:

    • For Felgo Games this is achieved with the Scene scaling mechanism.
    • For Felgo Apps, the usual solution is to not specify absolute pixel sizes for your UI elements, but a density independent size using the dp function.

    Hope this answers your question?

    Best,
    Günther

    #13343

    Megan

    Ah yes, you are right — that makes sense.  Thank you!  It is working as expected then and my thinking was backwards after a day debugging and refactoring other areas of my code.  (And yes, this is for a game using Scene Scaling and multiple texture packer files etc).

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded