Skip to content

IDLE uses incorrect screen dimension units #120104

Description

@serhiy-storchaka

In two places IDLE uses incorrect unit for screen dimension:

self.frame = frame = Frame(self, padding="5px")

self.frame = Frame(top, padding="5px")

It uses "5px", but the only documented valid suffixes are "c", "i", "m" and "p". Tk ignores the rest in versions < 8.7, but in 8.7 and 9.0 this is an error. And this is for good, because "px" did not mean pixels, as was expected, but printer's points (1/72 inch).

If we want to keep the same look, we should change "px" to "p". But if it originally should be in pixels, we should remove the suffix. In all other places padding is specified in pixels, and this makes sense, so I believe the latter option is better.

Linked PRs

Activity

  1. added
    3.12only security fixes
    3.13only security fixes
    3.14bugs and security fixes
    on Jun 5, 2024
  2. added a commit that references this issue on Jun 5, 2024
  3. terryjreedy commented on Jun 5, 2024

    @terryjreedy
    Member

    Both of those are ttk Frames PRs originally authored by Mark Roseman in 2020 for issue #78168. I would prefer consistently using pixels. I will check later to see the effect of just removing 'p' and if I prefer (as I suspect) increasing the number.

  4. terryjreedy commented on Aug 2, 2024

    @terryjreedy
    Member

    Since pixels are smaller than points, the result is slightly smaller padding in various places, but it looks fine to me. So I will leave the patch as is.

  5. added a commit that references this issue on Aug 6, 2024
  6. added 2 commits that reference this issue on Aug 6, 2024
  7. added a commit that references this issue on Aug 6, 2024
  8. added
    type-bugAn unexpected behavior, bug, or error
    and removed
    3.12only security fixes
    3.13only security fixes
    3.14bugs and security fixes
    on Aug 6, 2024
  9. added a commit that references this issue on Aug 7, 2024
  10. added a commit that references this issue on Aug 22, 2024
  11. added a commit that references this issue on Sep 27, 2024
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

    topic-IDLEtype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions