Skip to content

Create new API variants that allow to compute the size of a control given a Monitor #2501

@laeubi

Description

@laeubi

A Monitor can have different DPI setting, and some things (e.g. Fonts see here for an example) do not scale linear but SWT currently assume this for scaling.

To account for this, it would be good to have a new method:

Point computeSize (int wHint, int hHint, Monitor monitor)

that can be implemented by a control to account for this (the default method would simply delegate to Point computeSize (int wHint, int hHint)) to allow client code to possibly calculate (and possibly cache) values base on a monitor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions