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 theme colors for help viewer #78955

Open
terryjreedy opened this issue Sep 23, 2018 · 5 comments
Open

IDLE: use theme colors for help viewer #78955

terryjreedy opened this issue Sep 23, 2018 · 5 comments
Assignees
Labels
topic-IDLE type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 34774
Nosy @terryjreedy, @csabella
PRs
  • gh-78955: Use user-selected color theme for Help => IDLE Help. #9502
  • 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 = None
    created_at = <Date 2018-09-23.05:34:58.811>
    labels = ['3.8', 'expert-IDLE', 'type-feature', '3.7']
    title = 'IDLE: use theme colors for help viewer'
    updated_at = <Date 2018-09-23.13:02:05.464>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2018-09-23.13:02:05.464>
    actor = 'cheryl.sabella'
    assignee = 'terry.reedy'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2018-09-23.05:34:58.811>
    creator = 'terry.reedy'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34774
    keywords = ['patch']
    message_count = 4.0
    messages = ['326133', '326135', '326136', '326151']
    nosy_count = 2.0
    nosy_names = ['terry.reedy', 'cheryl.sabella']
    pr_nums = ['9502']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue34774'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    @terryjreedy
    Copy link
    Member Author

    terryjreedy commented Sep 23, 2018

    Follow-up to #78729. Use user-selected color theme for Help => IDLE Help. (Patch coming.)

    @terryjreedy terryjreedy added 3.7 (EOL) end of life 3.8 only security fixes type-feature A feature request or enhancement labels Sep 23, 2018
    @terryjreedy
    Copy link
    Member Author

    If HelpText is ever subclassed from a view text class, the color_config and call will be deleted. But changing the two fixed colors will be needed in any case.

    The background option in
    self.tag_configure('pre', font=(fixedfont, 12), background='#f6f6ff')
    was intended to give fixed-pitch words a very light bluish background, but I cannot see any difference, so deleting it is no loss.

    For the pre block, "background='#eeffcc'" gives the block a yellow background that matches the one used in online docs, as viewed by me with Firefox. So it is made conditional on the foreground color being the default solid black (which is different from tk's 'black').

    Border colors appear to be fixed at some black, making the border invisible on a black or near-black background. But it does not seem worthwhile to try to decide when to omit it.

    @terryjreedy terryjreedy self-assigned this Sep 23, 2018
    @terryjreedy
    Copy link
    Member Author

    I have tested this on Windows with both light and dark themes.

    @csabella
    Copy link
    Contributor

    This is working on Ubuntu. Probably not a big deal, but because the help viewer is not modal, it's possible to change the theme with the help window open and the text isn't updated on the help window. If the help is closed and reopened, then the new theme appears.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @terryjreedy terryjreedy removed 3.8 only security fixes 3.7 (EOL) end of life labels Dec 16, 2023
    @terryjreedy
    Copy link
    Member Author

    Python docs now have a theme selector at the top center-right with options 'Auto', 'Light', and 'Dark'. Box backgrounds and borders are grayed versions of the background and foreground colors. Perhaps 15%.

    Code within a box is somewhat highlighted, but skip for now as would have to restrict colorizing to box content.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-IDLE type-feature A feature request or enhancement
    Projects
    Status: In Progress
    Development

    No branches or pull requests

    2 participants