Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-111787

devicePixelRatio / zoom rescale error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4.2
    • GUI: High-DPI
    • None
    • Qt 6.4.2
      Chrome x64 110.0.5481.178
      Firefox x64 110.0
      Emscripten 3.1.14
      Windows 10
    • WebAssembly

    Description

      Hello, I have a bug that I don't understand.

      When using chrome without zoom window.devicePixelRatio return 1 and my application is well rendered.

      When I zoom out (for exemple 25%) window.devicePixelRatio return 0.25 and my application is rendered with a x4 factor.

      When I zoom in (for exemple 500%) windows.devicePixelRatio return 5 and my application is rendered with a /5 factor.

      (same results with firefox)

       

      Is there a way to to reverse the factor ? When zooming-out, I want my app to reduce it's size.

       

      To be precise, I think the zoom-in behavior work as expected because the canvas use a width and height of 100%, but the actual zoom-out behavior scale the app outside of the browser viewport  

      Attachments

        Activity

          People

            sorvig Morten Sørvig
            bastien-thonnat-personal Bastien Thonnat
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: