Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE: path browser unusable on some displays #81222

Closed
aroberge mannequin opened this issue May 25, 2019 · 3 comments
Closed

IDLE: path browser unusable on some displays #81222

aroberge mannequin opened this issue May 25, 2019 · 3 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 only security fixes topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@aroberge
Copy link
Mannequin

aroberge mannequin commented May 25, 2019

BPO 37041
Nosy @terryjreedy, @aroberge
Superseder
  • bpo-31552: IDLE: Convert browsers to use ttk.Treeview
  • Files
  • path_browser_problem.png: screen capture showing the problem
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = <Date 2021-06-03.16:23:21.025>
    created_at = <Date 2019-05-25.10:26:20.340>
    labels = ['3.8', 'expert-IDLE', 'type-bug', '3.7']
    title = 'IDLE: path browser unusable on some displays'
    updated_at = <Date 2021-06-03.16:23:21.025>
    user = 'https://github.com/aroberge'

    bugs.python.org fields:

    activity = <Date 2021-06-03.16:23:21.025>
    actor = 'aroberge'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2021-06-03.16:23:21.025>
    closer = 'aroberge'
    components = ['IDLE']
    creation = <Date 2019-05-25.10:26:20.340>
    creator = 'aroberge'
    dependencies = []
    files = ['48355']
    hgrepos = []
    issue_num = 37041
    keywords = []
    message_count = 3.0
    messages = ['343466', '343532', '343543']
    nosy_count = 2.0
    nosy_names = ['terry.reedy', 'aroberge']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '31552'
    type = 'behavior'
    url = 'https://bugs.python.org/issue37041'
    versions = ['Python 3.7', 'Python 3.8']

    @aroberge
    Copy link
    Mannequin Author

    aroberge mannequin commented May 25, 2019

    On my computer (Windows 10, screen resolution 3000 x 2000, scaling of text and other elements set at 200% as the recommended value), the path browser is essentially unusable as the items overlap each other. See the attached image.

    I found that changing the following:

        def draw(self, x, y):
            # XXX This hard-codes too many geometry constants!
            dy = 40  # changed from 20

    in tree.py solved the problem.

    @terryjreedy
    Copy link
    Member

    Another reason to replace IDLE's custom tree widget with hard-coded constants with ttk.Treeview.

    I am closing this because I believe that bpo-31552 will solve this problem. For an initial check, run the following test code, extracted from
    https://tkdocs.com/tutorial/tree.html
    Click the [+] buttons. I am curious whether commenting out the fix_scaling call makes any difference.

    ---------

    import tkinter as tk
    from tkinter import ttk
    from idlelib.run import fix_scaling
    
    root = tk.Tk()
    tree = ttk.Treeview(root)
    tree.pack()
    fix_scaling(root)
    
    tree.insert('', 'end', 'widgets', text='Widget Tour')
    tree.insert('', 0, 'gallery', text='Applications')
    id = tree.insert('', 'end', text='Tutorial')
    tree.insert('widgets', 'end', text='Canvas')
    tree.insert(id, 'end', text='Tree')
    
    root.mainloop()

    @terryjreedy terryjreedy added 3.7 (EOL) end of life 3.8 only security fixes topic-IDLE labels May 26, 2019
    @terryjreedy terryjreedy self-assigned this May 26, 2019
    @terryjreedy terryjreedy added the type-bug An unexpected behavior, bug, or error label May 26, 2019
    @aroberge
    Copy link
    Mannequin Author

    aroberge mannequin commented May 26, 2019

    I ran the example you gave and it worked perfectly.

    @aroberge aroberge mannequin closed this as completed Jun 3, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant