Skip to content

(Some) Dialogs are smaller than expected #400

@akoch-yatta

Description

@akoch-yatta

Description
Some dialogs will be smaller, e.g. the workspace selection dialog or the windows defender dialog

Reproduction
The described setup is not testable with a Runtime Workspace and must be setup correctly, but can happen easily in real scenarios because those dialogs are not opened then. There are probably other dialogs affected similarly in Runtime as well.

  1. Configure monitor setup as: Primary 150%, secondary 100%
  2. Very Important: Open the File Explorer and move it to the secondary monitor
  3. Start the latest I-Build from the File Explorer
Image Image

Expected Behavior
The text should not be wrapped unnecessarily (in workspace selection dialog) and it should be fully readable (windows defender dialog)

Necessary configuration:
monitor specific scaling on a 150% primary monitor

Additional knowledge
The reason is that the size of the Shell is originally calculated for the 100% zoom, then it will be moved to the primary monitor with 150%. The OS is giving us new bounds that are exactly scaling by factor 1.5. But as the font is updated as well and a text with a 150% font is not necessarily exactly 1.5 times the width of the text rendered a 100% font, unexpected text wrapping or a different overall height is the result.

One possible solution is to not use the bounds provided by the OS in Control#WM_DPICHANGED, but call computeSize on the Shell and set this bounds.

Sub-issues

Metadata

Metadata

Assignees

Labels

HiDPIA HiDPI-Related Issue or FeatureSWTIssue for SWT

Type

No type

Projects

Status

🏗 In Work: Short

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions