Skip to content

IDLE themes for light on dark #69008

Closed
Closed

Description

@roseman
mannequin
BPO 24820
Nosy @terryjreedy, @kbkaiser, @serwy, @roseman
Files
  • config-highlight.cfg
  • idle-dark.cfg
  • breakpoint-prefs.patch
  • 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 2015-10-04.04:46:00.305>
    created_at = <Date 2015-08-07.04:54:17.461>
    labels = ['expert-IDLE', 'type-feature']
    title = 'IDLE themes for light on dark'
    updated_at = <Date 2015-10-04.18:25:36.030>
    user = 'https://github.com/roseman'

    bugs.python.org fields:

    activity = <Date 2015-10-04.18:25:36.030>
    actor = 'markroseman'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2015-10-04.04:46:00.305>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2015-08-07.04:54:17.461>
    creator = 'markroseman'
    dependencies = []
    files = ['40570', '40634', '40635']
    hgrepos = []
    issue_num = 24820
    keywords = ['patch']
    message_count = 22.0
    messages = ['248177', '248220', '248225', '251550', '251563', '251588', '251607', '251614', '251621', '251624', '251645', '251646', '251970', '251975', '251979', '251981', '252186', '252187', '252255', '252256', '252259', '252279']
    nosy_count = 7.0
    nosy_names = ['terry.reedy', 'kbk', 'roger.serwy', 'markroseman', 'python-dev', 'Anand Krishnakumar', 'jayseye']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue24820'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5', 'Python 3.6']

    Activity

    1. roseman commented on Aug 7, 2015

      rosemanmannequin
      MannequinAuthor

      If there are going to be highlighting themes in IDLE, and the ability to customize them, why not the background color of the window? Light on dark is easier for some people to read - adding one that did that would be a good candidate for another built-in theme. Also many people (myself included) tend to use a light color other than white for editors, terminals, etc.

    2. terryjreedy commented on Aug 7, 2015

      @terryjreedy
      Member

      This looks like mostly a duplicate of bpo-7949. Can you differentiate?

    3. roseman commented on Aug 7, 2015

      rosemanmannequin
      MannequinAuthor

      I read bpo-7949 as saying the text widget picks up the background color from the system-wide GTk theme.

      This one is saying that the background color of the text widget should be changeable as part of an IDLE highlighting theme.

    4. roseman commented on Sep 24, 2015

      rosemanmannequin
      MannequinAuthor

      I wrote a short utility that parses TextMate XML-based theme files (which are also used by Sublime) and converts them into something IDLE can use. It's not a perfect match, because IDLE's themes are more restrictive, but it's not bad.

      I'm attaching the output of the script (config-highlight.cfg), which was able to translate 17 themes. A few are kind of yucky, and they all need some tweaking for selection and shell colors, but it's not a bad place to start...

    5. terryjreedy commented on Sep 25, 2015

      @terryjreedy
      Member

      I re-read bpo-7949 and read the problem as mixing a hard-coded (by tk or Idle is not clear) background (white) with a system-default foreground, which is also white when the system background is black. Hence the screenshot in duplicate bpo-16984. In any case, that issue is complementary to this one, about user-configured tagged text colors.

      Parsing an existing format is an interesting idea. Most of the variations seem pointless, but I like the cobalt one as a basis for a dark theme. I plan to improve it, using current Idle (Classic and New seem the same, so why two?), with my changes. I will upload when I have something I like.

      The change I made is to color the backgrounds of 'shell', 'stdout', and 'stderr' light yellow, light blue, and light red. These changes work so well for me, at least, that I have thought of adding them to an 'Idle New' that is really new and different. But transitions are hard. The main other thing I don't like in 'Idle ???' is the orange for keywords, as too 'different' from the purple and blue of builtings and defined. But green is semi standard for strings and that does not leave room for three colors on the blue side.

    6. roseman commented on Sep 25, 2015

      rosemanmannequin
      MannequinAuthor

      Sounds good. I agree picking a few and tweaking them would be a good way forward (and incidentally, the 'Cobalt' theme is the one I use in my regular editor!)

    7. terryjreedy commented on Sep 25, 2015

      @terryjreedy
      Member

      For me, Idle comes with one light theme, under 2 names. I don't know what happens on Mac. Let us add one dark theme as Idle Dark, before 3.4.4 if possible.

      We can later consider whether to add more light and dark built-in themes. But I think more important would be to add the ability to change at once the background of all elements that use the default (normal) background. I believe you have mentioned that one might want to change white to an off-white. Cobalt is an off-black, but someone might prefer black black, or the slightly bluer background of Windows Power Shell. We should not have multiple themes just for background variations.

    8. roseman commented on Sep 25, 2015

      rosemanmannequin
      MannequinAuthor

      Ok, do you want to add the dark theme in then? I'll add some code to the ttk based preferences dialog (for when that gets in) to give the user the option of applying the new background color to all the other elements which had the same original background color.

    9. terryjreedy commented on Sep 25, 2015

      @terryjreedy
      Member

      Here is an Idle Dark theme that is the near-inverse of the standard Idle theme, with foreground colors tweaked just a bit to account for the background switch and its blue tint. It otherwise retains the current color mapping. What do you think?

    10. roseman commented on Sep 25, 2015

      rosemanmannequin
      MannequinAuthor

      Looks good to me!

    11. AnandKrishnakumar commented on Sep 26, 2015

      AnandKrishnakumarmannequin
      Mannequin

      Hi!
      I'm a 14 year old who wants to start developing for Python. I absolutely adore this enhancement and I would love to contribute towards this.
      So please let me know if I can help, and if yes, how?

    12. terryjreedy commented on Sep 26, 2015

      @terryjreedy
      Member

      My only question right now is whether I should apply as is or with minor adjustments. Thanks for the encouragements either way.

    13. jayseye commented on Sep 30, 2015

      jayseyemannequin
      Mannequin

      Greetings from an idle-dev 'lurker.' Has anyone tested the new dark
      theme with a Set Breakpoint command? The dark theme is great for me
      except for this quirk: breakpoints are invisible on my test box. Under
      the Classic light scheme breakpoints appear on a bright yellow
      background.

      Appreciate all the interest and work going into idle these days. I'll
      add any needed details on request. For starters I'm just wondering
      whether breakpoints have yet to be tested with this dark theme.

      Thanks,
      jayseye (Marc Paul Rubin)

    14. roseman commented on Sep 30, 2015

      rosemanmannequin
      MannequinAuthor

      Hi Marc, you're correct that is an error in the theme. To correct it, change the setting for 'break-background' to be something like bpo-666622. Thanks!

    15. terryjreedy commented on Sep 30, 2015

      @terryjreedy
      Member

      Marc, thanks for unlurking. I like something a bit brighter, such as bpo-808000, though it does not matter much in this color area. We are revising the highlight tab and should add a line [ breakpoint ] to the sample box.

    16. roseman commented on Oct 1, 2015

      rosemanmannequin
      MannequinAuthor

      Attached a patch to the current config dialog to add breakpoint to the window, and have updated the same thing in my newer dialog.

    17. python-dev commented on Oct 3, 2015

      python-devmannequin
      Mannequin

      New changeset e67da755d614 by Terry Jan Reedy in branch '2.7':
      Issue bpo-24820: Users can now set breakpoint colors in Settings ->
      https://hg.python.org/cpython/rev/e67da755d614

      New changeset d874a6157223 by Terry Jan Reedy in branch '3.4':
      Issue bpo-24820: Users can now set breakpoint colors in Settings ->
      https://hg.python.org/cpython/rev/d874a6157223

    18. terryjreedy commented on Oct 3, 2015

      @terryjreedy
      Member

      I was going to push both a version of the breakpoint patch and the new theme, but noticed a problem. If someone selects IDLE Dark and saves that choice and then run an older Python+IDLE, then the older IDLE will not find 'IDLE Dark' and will run a backup default black and white theme, possibly with some error messages. The solution is to select IDLE Dark and then immediately hit [Save as New Custom Theme] and enter a different name. IDLE will then change Select: from (o) a Built-in Theme to (o) a Custom Theme, with the saved name selected. I want to add a popup to say this before adding the theme.

    19. python-dev commented on Oct 4, 2015

      python-devmannequin
      Mannequin

      New changeset afa95f032de1 by Terry Jan Reedy in branch '2.7':
      Issue bpo-24820: Add 'IDLE Dark' text color theme, warning, and solution.
      https://hg.python.org/cpython/rev/afa95f032de1

      New changeset 1de01a63f360 by Terry Jan Reedy in branch '3.4':
      Issue bpo-24820: Add 'IDLE Dark' text color theme, warning, and solution.
      https://hg.python.org/cpython/rev/1de01a63f360

    20. terryjreedy commented on Oct 4, 2015

      @terryjreedy
      Member

      See patch for message. Merely displaying a message, and not trying to do anything fancy, like cancelling the selection, avoids any possible problem in interaction with other methods. I leave it to users to decide if action is needed, and if so, whether to switch or save as custom.

      Mark's original post had two issues. The first, a dark background theme, is now committed and this issue closed. Thanks for the push for something requested by others. I am using it myself.

      The second, the ability to simultaneously change all default backgrounds, such as white to off-white, is or will be either a new issue or part of the highlight tab rewrite, bpo-24781.

    21. self-assigned this
      on Oct 4, 2015
    22. python-dev commented on Oct 4, 2015

      python-devmannequin
      Mannequin

      New changeset 739cc9ca55cd by Terry Jan Reedy in branch '2.7':
      Issue bpo-24820: Update IDLE NEWS items.
      https://hg.python.org/cpython/rev/739cc9ca55cd

      New changeset 233974dfda03 by Terry Jan Reedy in branch '3.4':
      Issue bpo-24820: Update IDLE NEWS items.
      https://hg.python.org/cpython/rev/233974dfda03

      New changeset 89a1e03b4639 by Terry Jan Reedy in branch '3.5':
      Issue bpo-24820: Update IDLE NEWS items.
      https://hg.python.org/cpython/rev/89a1e03b4639

    23. roseman commented on Oct 4, 2015

      rosemanmannequin
      MannequinAuthor

      FYI, the change multiple backgrounds thing is in my working version for the new dialog. Added new issue bpo-25313 to remind us that the warning message is something we'd love to get rid of in the future and as quickly as possible make it unnecessary if we add more new themes and/or new features in themes.

    24. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions