You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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=<Date2015-10-04.04:46:00.305>created_at=<Date2015-08-07.04:54:17.461>labels= ['expert-IDLE', 'type-feature']
title='IDLE themes for light on dark'updated_at=<Date2015-10-04.18:25:36.030>user='https://github.com/roseman'
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.
This looks like mostly a duplicate of bpo-7949. Can you differentiate?
roseman commented on Aug 7, 2015
rosemanmannequin
MannequinAuthor
More actions
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.
roseman commented on Sep 24, 2015
rosemanmannequin
MannequinAuthor
More actions
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...
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.
roseman commented on Sep 25, 2015
rosemanmannequin
MannequinAuthor
More actions
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!)
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.
roseman commented on Sep 25, 2015
rosemanmannequin
MannequinAuthor
More actions
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.
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?
roseman commented on Sep 25, 2015
rosemanmannequin
MannequinAuthor
More actions
Looks good to me!
AnandKrishnakumar commented on Sep 26, 2015
AnandKrishnakumarmannequin
Mannequin
More actions
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?
My only question right now is whether I should apply as is or with minor adjustments. Thanks for the encouragements either way.
jayseye commented on Sep 30, 2015
jayseyemannequin
Mannequin
More actions
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)
roseman commented on Sep 30, 2015
rosemanmannequin
MannequinAuthor
More actions
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!
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.
roseman commented on Oct 1, 2015
rosemanmannequin
MannequinAuthor
More actions
Attached a patch to the current config dialog to add breakpoint to the window, and have updated the same thing in my newer dialog.
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.
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.
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.
Activity
roseman commentedon Aug 7, 2015
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.
terryjreedy commentedon Aug 7, 2015
This looks like mostly a duplicate of bpo-7949. Can you differentiate?
roseman commentedon Aug 7, 2015
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.
roseman commentedon Sep 24, 2015
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...
terryjreedy commentedon Sep 25, 2015
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.
roseman commentedon Sep 25, 2015
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!)
terryjreedy commentedon Sep 25, 2015
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.
roseman commentedon Sep 25, 2015
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.
terryjreedy commentedon Sep 25, 2015
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?
roseman commentedon Sep 25, 2015
Looks good to me!
AnandKrishnakumar commentedon Sep 26, 2015
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?
terryjreedy commentedon Sep 26, 2015
My only question right now is whether I should apply as is or with minor adjustments. Thanks for the encouragements either way.
jayseye commentedon Sep 30, 2015
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)
roseman commentedon Sep 30, 2015
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!
terryjreedy commentedon Sep 30, 2015
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.
roseman commentedon Oct 1, 2015
Attached a patch to the current config dialog to add breakpoint to the window, and have updated the same thing in my newer dialog.
python-dev commentedon Oct 3, 2015
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
terryjreedy commentedon Oct 3, 2015
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.
python-dev commentedon Oct 4, 2015
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
terryjreedy commentedon Oct 4, 2015
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.
python-dev commentedon Oct 4, 2015
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
roseman commentedon Oct 4, 2015
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.