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: use ttk.Frame for ttk widgets #78168

Closed
roseman mannequin opened this issue Jun 28, 2018 · 20 comments
Closed

IDLE: use ttk.Frame for ttk widgets #78168

roseman mannequin opened this issue Jun 28, 2018 · 20 comments
Assignees
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes topic-IDLE type-feature A feature request or enhancement

Comments

@roseman
Copy link
Mannequin

roseman mannequin commented Jun 28, 2018

BPO 33987
Nosy @terryjreedy, @roseman, @csabella, @miss-islington
PRs
  • bpo-33987: IDLE - use ttk Frame for ttk widgets #11395
  • [3.7] bpo-33987: IDLE - use ttk Frame for ttk widgets (GH-11395) #11419
  • bpo-33987: IDLE: Use ttk Frame on help.py #11433
  • [3.9] bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433) #22899
  • [3.8] bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433) #22900
  • bpo-33987: use ttk labels on IDLE statusbar #22941
  • bpo-33987: ttk frame inside search dialog toplevel #22942
  • bpo-33987: ttk frame inside config dialog toplevel #22943
  • [3.9] bpo-33987: Use ttk Label on IDLE statusbar (GH-22941) #22949
  • [3.8] bpo-33987: Use ttk Label on IDLE statusbar (GH-22941) #22950
  • [3.9] bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943) #22951
  • [3.8] bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943) #22952
  • [3.8] bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942) #22956
  • [3.9] bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942) #22957
  • Files
  • topframe.png
  • 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 2020-10-25.03:58:21.024>
    created_at = <Date 2018-06-28.04:02:30.668>
    labels = ['expert-IDLE', 'type-feature', '3.8', '3.9', '3.10']
    title = 'IDLE: use ttk.Frame for ttk widgets'
    updated_at = <Date 2020-10-25.03:58:21.023>
    user = 'https://github.com/roseman'

    bugs.python.org fields:

    activity = <Date 2020-10-25.03:58:21.023>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2020-10-25.03:58:21.024>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2018-06-28.04:02:30.668>
    creator = 'markroseman'
    dependencies = []
    files = ['47655']
    hgrepos = []
    issue_num = 33987
    keywords = ['patch', 'patch', 'patch']
    message_count = 20.0
    messages = ['320646', '320800', '332837', '332839', '332904', '332905', '379321', '379324', '379331', '379332', '379544', '379545', '379547', '379548', '379549', '379551', '379557', '379558', '379559', '379561']
    nosy_count = 4.0
    nosy_names = ['terry.reedy', 'markroseman', 'cheryl.sabella', 'miss-islington']
    pr_nums = ['11395', '11419', '11433', '22899', '22900', '22941', '22942', '22943', '22949', '22950', '22951', '22952', '22956', '22957']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue33987'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    @roseman
    Copy link
    Mannequin Author

    roseman mannequin commented Jun 28, 2018

    When adding a bunch of ttk widgets into a toplevel window, there needs to be an intervening ttk.Frame to ensure the background of the widgets matches the overall background.

    The reason is the 'toplevel' is part of the classic tk widgets and not ttk, so it isn't guaranteed to have the same background. In practice, the only platform where the toplevel and ttk.Frame have different backgrounds is macOS. Check out topframe.png for an example, top is without the intervening ttk.Frame, bottom adds it in.

    (Adding bug mainly so we have a place to store a concrete example of what this looks like)

    @roseman roseman mannequin added 3.7 (EOL) end of life 3.8 only security fixes labels Jun 28, 2018
    @roseman roseman mannequin assigned terryjreedy Jun 28, 2018
    @roseman roseman mannequin added topic-IDLE type-feature A feature request or enhancement labels Jun 28, 2018
    @terryjreedy
    Copy link
    Member

    The image could have been attached to bpo-27477, but a new issue for a new PR is needed anyway. I will make this a dependency of that issue.

    I did not at first see the difference in the screen-capture images on my monitor in Firefox with the room lighting and my eye condition as it was then, but today I do. On Mac, the defaulf ttk background is slightly darker than the default tk background. (No so on Windows.) It looks subtlely tacky. I imagine this effect might be more obvious and annoying on the live screen.

    As I mentioned elsewhere, this is a second reason to insert a frame inside Toplevel, but it is a reason to do this *now*. Please submit a PR for this addition to searchbase: a new ttk Frame, with a bit of space added. Please call it self.frame as in query or perhaps self.searchframe, analogous to viewframe in textview.

    When SearchDialogBase is renamed SearchFrameBase(Frame) and the toplevel stuff moved to another class, self.???frame in the Frame subclass will become self, so the name will only appear in the toplevel class.

    In test_searchbase.SearchDialogBaseTest.test_open_and_close, adding
    self.assertEqual(self.dialog.frame.state(), 'normal')
    will test the change, failing now, passing with it. I don't know of any other changes needed in files other than searchbase.

    configdialog needs a similar PR. config_key needs a complete ttk conversion.

    @terryjreedy terryjreedy changed the title need ttk.Frame inside Toplevel(s) IDLE: add ttk.Frame inside searchbaseToplevel Jun 30, 2018
    @terryjreedy
    Copy link
    Member

    The change is trivial and there was already a Frame test, which initially failed. I will open another issue about similar changes needed elsewhere.

    @terryjreedy
    Copy link
    Member

    We don't really need a new issue. Mark's opening post was generic. I grepped for ttk to get existing ttk imports and am making Frame and LabelFrame the first item or items for each import. I won't worry about whether any background is visible, as this could change.

    Cheryl, please note the import convention and review the diff when posted.

    @terryjreedy terryjreedy changed the title IDLE: add ttk.Frame inside searchbaseToplevel IDLE: use ttk.Frame for ttk widgets Dec 31, 2018
    @terryjreedy
    Copy link
    Member

    New changeset aff0ada by Terry Jan Reedy in branch 'master':
    bpo-33987: IDLE - use ttk Frame for ttk widgets (GH-11395)
    aff0ada

    @miss-islington
    Copy link
    Contributor

    New changeset b364caa by Miss Islington (bot) in branch '3.7':
    bpo-33987: IDLE - use ttk Frame for ttk widgets (GH-11395)
    b364caa

    @terryjreedy
    Copy link
    Member

    I closed this prematurely. Cheryl's PR 11433 converts frames for help and statusbar. My patch also omitted searchbase, perhaps because this I wanted to refactor at the same time. In any case, the macOS appearance bug that motivated Mark's post remains, and a patch will have to make sure that the derived dialogs add frames inside the new master frame instead of the toplevel.

    The message I deleted meant to say
    bpo-35598 converted config_key to ttk, including a ttk frame inside toplevel.

    @terryjreedy terryjreedy added 3.9 only security fixes 3.10 only security fixes and removed 3.7 (EOL) end of life labels Oct 22, 2020
    @terryjreedy terryjreedy reopened this Oct 22, 2020
    @terryjreedy
    Copy link
    Member

    New changeset facb522 by Cheryl Sabella in branch 'master':
    bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433)
    facb522

    @terryjreedy
    Copy link
    Member

    New changeset 25687bb by Miss Skeleton (bot) in branch '3.9':
    bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433) (GH-22899)
    25687bb

    @terryjreedy
    Copy link
    Member

    New changeset 06c9e01 by Miss Skeleton (bot) in branch '3.8':
    bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433) (GH-22900)
    06c9e01

    @terryjreedy
    Copy link
    Member

    New changeset e53e544 by Mark Roseman in branch 'master':
    bpo-33987: Use ttk Label on IDLE statusbar (GH-22941)
    e53e544

    @terryjreedy
    Copy link
    Member

    New changeset c579ad1 by Mark Roseman in branch 'master':
    bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943)
    c579ad1

    @miss-islington
    Copy link
    Contributor

    New changeset c1b620e by Miss Skeleton (bot) in branch '3.8':
    bpo-33987: Use ttk Label on IDLE statusbar (GH-22941)
    c1b620e

    @miss-islington
    Copy link
    Contributor

    New changeset 4efd2de by Miss Skeleton (bot) in branch '3.9':
    bpo-33987: Use ttk Label on IDLE statusbar (GH-22941)
    4efd2de

    @miss-islington
    Copy link
    Contributor

    New changeset 253c8eb by Miss Skeleton (bot) in branch '3.8':
    bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943)
    253c8eb

    @miss-islington
    Copy link
    Contributor

    New changeset 2d49389 by Miss Skeleton (bot) in branch '3.9':
    bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943)
    2d49389

    @terryjreedy
    Copy link
    Member

    New changeset 5df6c99 by Mark Roseman in branch 'master':
    bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)
    5df6c99

    @miss-islington
    Copy link
    Contributor

    New changeset 9cf26b0 by Miss Skeleton (bot) in branch '3.9':
    bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)
    9cf26b0

    @miss-islington
    Copy link
    Contributor

    New changeset 8485d3b by Miss Skeleton (bot) in branch '3.8':
    bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)
    8485d3b

    @terryjreedy
    Copy link
    Member

    Thanks for hopefully finishing this issue.

    @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.8 only security fixes 3.9 only security fixes 3.10 only security fixes topic-IDLE type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants