diff --git a/gooey/gui/windows/base_window.py b/gooey/gui/windows/base_window.py index bf9280d..51a8644 100644 --- a/gooey/gui/windows/base_window.py +++ b/gooey/gui/windows/base_window.py @@ -56,7 +56,7 @@ class BaseWindow(wx.Frame): subheading=_desc or '', parent=self) - self.runtime_display = RuntimeDisplay(self) + self.runtime_display = RuntimeDisplay(self, self.build_spec) self.foot_panel = footer.Footer(self) self.panels = [self.head_panel, self.config_panel, self.foot_panel] diff --git a/gooey/gui/windows/runtime_display_panel.py b/gooey/gui/windows/runtime_display_panel.py index 6335a46..5c544a9 100644 --- a/gooey/gui/windows/runtime_display_panel.py +++ b/gooey/gui/windows/runtime_display_panel.py @@ -23,9 +23,11 @@ class MessagePump(object): class RuntimeDisplay(wx.Panel): - def __init__(self, parent, **kwargs): + def __init__(self, parent, build_spec, **kwargs): wx.Panel.__init__(self, parent, **kwargs) + self.build_spec = build_spec + self._init_properties() self._init_components() self._do_layout() @@ -39,6 +41,11 @@ class RuntimeDisplay(wx.Panel): self.cmd_textbox = wx.TextCtrl( self, -1, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH) + if self.build_spec.get('monospace_display'): + pointsize = self.cmd_textbox.GetFont().GetPointSize() + font = wx.Font(pointsize, wx.FONTFAMILY_MODERN, + wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False) + self.cmd_textbox.SetFont(font) def _do_layout(self): sizer = wx.BoxSizer(wx.VERTICAL) diff --git a/gooey/python_bindings/config_generator.py b/gooey/python_bindings/config_generator.py index 9c7064c..a4d9e7a 100644 --- a/gooey/python_bindings/config_generator.py +++ b/gooey/python_bindings/config_generator.py @@ -21,7 +21,8 @@ def create_from_parser(parser, source_path, **kwargs): 'num_required_cols': kwargs.get('required_cols', 1), 'num_optional_cols': kwargs.get('optional_cols', 3), 'manual_start': False, - 'layout_type': 'column' + 'layout_type': 'column', + 'monospace_display': kwargs.get('monospace_display', False) } if show_config: diff --git a/gooey/python_bindings/gooey_decorator.py b/gooey/python_bindings/gooey_decorator.py index 53fd3f2..4850fbd 100644 --- a/gooey/python_bindings/gooey_decorator.py +++ b/gooey/python_bindings/gooey_decorator.py @@ -31,7 +31,8 @@ def Gooey(f=None, default_size=(610, 530), required_cols=2, optional_cols=2, - dump_build_config=False): + dump_build_config=False, + monospace_display=False): ''' Decorator for client code's main function. Serializes argparse data to JSON for use with the Gooey front end