Browse Source

more pythonic

pull/473/head
eladeyal 5 years ago
committed by Chris
parent
commit
7ea39f3a4b
1 changed files with 7 additions and 8 deletions
  1. 15
      gooey/gui/components/widgets/richtextconsole.py

15
gooey/gui/components/widgets/richtextconsole.py

@ -43,14 +43,13 @@ class RichTextConsole(wx.richtext.RichTextCtrl):
self.end = colored.style.END
self.noop = lambda *args, **kwargs: None
self.actionsMap = dict()
# Supported font altering actions
self.actionsMap[colored.style.BOLD] = self.BeginBold
self.actionsMap[colored.style.RES_BOLD] = self.EndBold
self.actionsMap[colored.style.UNDERLINED] = self.BeginUnderline
self.actionsMap[colored.style.RES_UNDERLINED] = self.EndUnderline
self.actionsMap[colored.style.RESET] = self.EndAllStyles
self.actionsMap = {
colored.style.BOLD: self.BeginBold,
colored.style.RES_BOLD: self.EndBold,
colored.style.UNDERLINED: self.BeginUnderline,
colored.style.RES_UNDERLINED: self.EndUnderline,
colored.style.RESET: self.EndAllStyles,
}
# Actions for coloring text
for index, hex in enumerate(kColorList):

Loading…
Cancel
Save