Scaling

Auto-Adjust

This functionality was extended to other UIs from the Mobile UI. Its aim is to show all operating elements within the visible area.

When opening a panel, it is checked if the panel can be shown inside the available area. For this the scale factor is calculated:

Consider the differences between modules:

  • If the panel is opened in a toplevel module, the result is the scale factor.
  • If the panel is opened in an embedded module, the zoom factor of the main panel is added to the result.

The resulting panelsize is the saved panelsize multiplied with the resulting scale factor. Additionally, the maximual size of the available area is determined (e.g: the screen size minus taskbar, window frames, iconbar/menubar).

Auto Downscale functionality:

When a panel is not shown as fullscreen the Auto Downscale functionality is applied.

When the panel is smaller than the available area times the [ui] autoDownscaleThreshold factor (default is 2, so not twice as big as the visible area) then it is adjusted (along the longer side) to fit the visible area (scaled down).

This functionality can be deactivated entirely by setting [ui] autoDownscaleThreshold to 1.

Auto Upscale functionality:

Within an embedded module, or if the module window is maximized or in fullscreen, a panel can also be enlarged, when the available area is bigger than the panel itself. This does not happen if a panel has a layout. It is also only applied if the panel is in the modus SCALE_ZOOM (setScaleStyle()). This is the default for embedded modules and has to be set for VISION Modules.

DPI Scaling

The aim is to show the panel on all devices at the exact physical size (e.g.: in cm) it had on the screen it was first created on. This can lead to a zoom factor which can be either bigger or smaller than 1.

Physical DPI are only saved in the panel when it is initially created. If this was not saved (e.g.: for older panels), then a value of 96 is assumed.

If the difference between the initial creation and the current display area is bigger than the [ui] scalePanelsDPIDeadband, DPI Scaling is used.

Manifest file for larger representation of UIs

A manifest file can be defined on Windows. This allows that the WinCC OA UI can be displayed larger on e.g. 4K screens. This is a possible alternative to DPI scaling on Windows.

First check that the manifest file is enabled in the registry (=pre-requisite):

  • Open the regedit and navigate to the registry key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide
  • Right-click and select NEW -> DWORD (32 bit) Value
  • Enter PreferExternalManifest and then press the ENTER key.
  • Right-click PreferExternalManifest, and then click Change.

  • Enter Value Data 1 and select Decimal.
  • Click OK and exit the registry editor.

You can find an Overview on the Microsoft page: https://docs.microsoft.com/en-us/windows/win32/sbscs/application-manifests

Save the WCCOAui.exe.manifest file in the bin directory of the version with the following content:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
        
        <dependency>
        <dependentAssembly>
        <assemblyIdentity
        type="win32"
        name="Microsoft.Windows.Common-Controls"
        version="6.0.0.0" processorArchitecture="*"
        publicKeyToken="6595b64144ccf1df"
        language="*">
        </assemblyIdentity>
        </dependentAssembly>
        </dependency>
        
        <dependency>
        <dependentAssembly>
        <assemblyIdentity
        type="win32"
        name="Microsoft.VC90.CRT"
        version="9.0.21022.8"
        processorArchitecture="amd64"
        publicKeyToken="1fc8b3b9a1e18e3b">
        </assemblyIdentity>
        </dependentAssembly>
        </dependency>
        
        <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
        <requestedPrivileges>
        <requestedExecutionLevel
        level="asInvoker"
        uiAccess="false"/>
        </requestedPrivileges>
        </security>
        </trustInfo>
        
        <asmv3:application>
        <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
        <ms_windowsSettings:dpiAware xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</ms_windowsSettings:dpiAware>
        </asmv3:windowsSettings>
        </asmv3:application>
        
        </assembly>     

Scaling of GEDI on High Resolution Displays

The user interface is scaled as follows on high-resolution displays from a scaling of 150%:

  • On Windows: depending on the display settings of the Windows operating system (Scale and layout).
  • On Linux: depending on the zoom setting of the Linux operating system (100%, 200%, ...).

If you set the config entry [ui] scalePanelsPerPhysicalDPI to 1, panels are scaled depending on the DPI value (not Windows settings).

You can restore the previous behavior by setting the environment variable QT_AUTO_SCREEN_SCALE_FACTOR=0.