Skip to content

Screen.dpi tries to refer to 45° angle #713

Description

@Enyium

Running this in the Talon REPL shows that .dpi is the hypotenuse of .dpi_x and .dpi_y:

from talon import screen
import math
s = screen.containing(0, 0)
s.dpi_x
s.dpi_y
s.dpi
h = math.sqrt(s.dpi_x ** 2 + s.dpi_y ** 2); h
abs(h - s.dpi) < 0.000001
(h - s.dpi) == 0

Although even this is incorrect, because the DPI of the 45° angle would be smaller, not greater than the x or y DPI.

This is misleading, because .dpi is perceived as a tolerable substitute of .dpi_x/.dpi_y. It would be more sensible to have the average of .dpi_x and .dpi_y in .dpi.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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