Skip to content

[Win32] Wrong text extent calculation with swt.autoScale=int200 #2361

@HeikoKlare

Description

@HeikoKlare

Describe the bug
When running an Eclipse product without monitor-specific scaling (e.g., by disabling the preference or with -Dswt.autoScale.updateOnRuntime=false) and default auto-scale settings (i.e., the implicit swt.autoScale=quarter), wrong font sizes are considered at some places. This particularly includes the header size calculation of CTabFolders, which may become too large/small.
This also happens when running any pure SWT application with default auto-scale settings, such as the CustomControlExample.

It is a regression from:

To Reproduce

  • Set primary monitor zoom to something different than 100% or 200% (e.g., 150%).
  • Start the CustomControlExample with default settings and go to the CTabFolder tab or start an Eclipse SDK.
  • You will see that tab headers are too small.

Expected behavior
CTabFolder headers shall be sized correct.

Screenshots
Image

Image

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • All OS
    • Windows
    • Linux
    • macOS

Version since
I20250714-1800

Metadata

Metadata

Assignees

No one assigned

    Labels

    HiDPIIssues related to High resolution monitorsWindowsHappens on Windows OSregressionSomething that used to work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions