summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/textview.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-09-23 13:31:35 (GMT)
committerGitHub <noreply@github.com>2018-09-23 13:31:35 (GMT)
commitaeadf59e457ca0ee20983eb1ed78b348f0b453e3 (patch)
treed92b449f7556971b7df52271db9653762e5ee474 /Lib/idlelib/textview.py
parentc73df53569f86d0c7742bafa55958c53d57a02e4 (diff)
downloadcpython-aeadf59e457ca0ee20983eb1ed78b348f0b453e3.zip
cpython-aeadf59e457ca0ee20983eb1ed78b348f0b453e3.tar.gz
cpython-aeadf59e457ca0ee20983eb1ed78b348f0b453e3.tar.bz2
bpo-34548: IDLE: use configured theme colors in TextView (GH-9008)
https://bugs.python.org/issue34548 (cherry picked from commit c87d9f406bb23657c1b4cd63017bb7bd7693a1fb) Co-authored-by: Tal Einat <taleinat+github@gmail.com>
Diffstat (limited to 'Lib/idlelib/textview.py')
-rw-r--r--Lib/idlelib/textview.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/idlelib/textview.py b/Lib/idlelib/textview.py
index 75b2470..464e6ac 100644
--- a/Lib/idlelib/textview.py
+++ b/Lib/idlelib/textview.py
@@ -5,6 +5,8 @@ from tkinter import Toplevel, Text
from tkinter.ttk import Frame, Scrollbar, Button
from tkinter.messagebox import showerror
+from idlelib.colorizer import color_config
+
class TextFrame(Frame):
"Display text with scrollbar."
@@ -18,12 +20,9 @@ class TextFrame(Frame):
super().__init__(parent)
self['relief'] = 'sunken'
self['height'] = 700
- # TODO: get fg/bg from theme.
- self.bg = '#ffffff'
- self.fg = '#000000'
- self.text = text = Text(self, wrap='word', highlightthickness=0,
- fg=self.fg, bg=self.bg)
+ self.text = text = Text(self, wrap='word', highlightthickness=0)
+ color_config(text)
self.scroll = scroll = Scrollbar(self, orient='vertical',
takefocus=False, command=text.yview)
text['yscrollcommand'] = scroll.set