Giter Site home page Giter Site logo

FR - Linux HIDPI support about vstgui HOT 9 CLOSED

Audiojunkie avatar Audiojunkie commented on June 10, 2024
FR - Linux HIDPI support

from vstgui.

Comments (9)

scheffle avatar scheffle commented on June 10, 2024

Hi, can you elaborate on what is missing to support HiDPI on Linux? Thanks.

from vstgui.

Audiojunkie avatar Audiojunkie commented on June 10, 2024

Hello! I am not a programmer, but I was informed by a developer a software that I am trying to use that VSTGUI doesnโ€™t support HIDPI on linux, and that is the reason his software doesnโ€™t support HIDPI. See here:

sfztools/sfizz-ui#35

The documentation indicates that Linux isnโ€™t supported for HIDPI. I felt that it would be proactive to request this feature. More and more plugin users on Linux are using HIDPI screens. Wayland is even supporting fractional scaling now. This is a feature we need. ๐Ÿ™‚

from vstgui.

Audiojunkie avatar Audiojunkie commented on June 10, 2024

Edit: This is the correct link:

sfztools/sfizz-ui#35

from vstgui.

scheffle avatar scheffle commented on June 10, 2024

Concerning VSTGUI: it supports any scale factor you throw at it. The developer only needs to call CFrame::setZoom.
The problem on Linux may be that the host needs to tell the plug-in which scale factor to use.

from vstgui.

Audiojunkie avatar Audiojunkie commented on June 10, 2024

Very interesting! I'll direct the developer to this comment. Maybe the two development teams can get a solution into Sfizz. :)

Thank you for the info! ๐Ÿ‘

from vstgui.

scheffle avatar scheffle commented on June 10, 2024

Hi @Audiojunkie,
I just checked this on Linux and when building the VSTGUI standalone examples they support HiDPI without issues. So it's up to the host and plug-in developers to properly implement this in their hosts and plug-ins.

from vstgui.

Audiojunkie avatar Audiojunkie commented on June 10, 2024

Thank you everyone! I really appreciate you looking into this! ๐Ÿ™‚

from vstgui.

redtide avatar redtide commented on June 10, 2024

The problem in the end is not the HiDPI support, but the lack of the system scale factor.

AFAICS there are 2 types of scale factors: the zoom (get|setZoom() functions) which is an user preference and the system wide scale factor, which in VSTGUI is represented by the platformScaleFactor variable, set by default to 1 at least on Linux. There is CFrame::platformScaleFactorChanged that sets it but it seems to be called only in the macOS version (protected function and the class is declared as final, so no way to derive and override the former, probably just to call the default implementation to pass the system scale).
The resulting scale factor is obtained by getScaleFactor() function, which returns the product of zoom and system scale, so that on Linux is the same as getZoom() if platformScaleFactor is never set.

In brief what it's not there (except on macOS) is the system scale factor auto detection.
The documentation looks a bit confusing to me, because setZoom is a custom user setting, not the system wide (no setScaleFactor()).

from vstgui.

scheffle avatar scheffle commented on June 10, 2024

For VST3 there's a dedicated interface (IPlugViewContentScaleSupport) to set the scale factor of a plug-in editor. This interface must be called by the host to set the desired scale factor and the plug-in can then call CFrame::setZoom(scaleFactor). The platform scale factor is only used on macOS, because there the system uses this factor throughout the system. If you ask a window on macOS for its size you get the size divided by the scale factor. If you do this on Windows or Linux you get the actual size in pixels.
So on Linux you need to use CFrame::setZoom(scaleFactor) and the host has to tell the plug-in editors the scale factor.

from vstgui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.