diff --git a/IPython/frontend/qt/console/ipython_widget.py b/IPython/frontend/qt/console/ipython_widget.py index b42c007..c60436d 100644 --- a/IPython/frontend/qt/console/ipython_widget.py +++ b/IPython/frontend/qt/console/ipython_widget.py @@ -198,7 +198,7 @@ class IPythonWidget(FrontendWidget): """ Restores the default IPythonWidget styling. """ self.set_styling(self.default_stylesheet, syntax_style='default') - #self.set_styling(self.dark_stylesheet, syntax_style='monokai') + # self.set_styling(self.dark_stylesheet, syntax_style='monokai') def set_editor(self, editor): """ Sets the editor to use with the %edit magic. diff --git a/IPython/frontend/qt/console/rich_ipython_widget.py b/IPython/frontend/qt/console/rich_ipython_widget.py index 9003af7..4683f26 100644 --- a/IPython/frontend/qt/console/rich_ipython_widget.py +++ b/IPython/frontend/qt/console/rich_ipython_widget.py @@ -15,6 +15,17 @@ class RichIPythonWidget(IPythonWidget): # Protected class variables. _svg_text_format_property = 1 + # We need to override this because this class uses QTextEdit. + dark_stylesheet = """ + QTextEdit { background-color: black; color: white } + QFrame { border: 1px solid grey; } + .error { color: red; } + .in-prompt { color: lime; } + .in-prompt-number { color: lime; font-weight: bold; } + .out-prompt { color: red; } + .out-prompt-number { color: red; font-weight: bold; } + """ + #--------------------------------------------------------------------------- # 'object' interface #--------------------------------------------------------------------------- diff --git a/IPython/zmq/pylab/backend_payload_svg.py b/IPython/zmq/pylab/backend_payload_svg.py index ba1b38e..f614d02 100644 --- a/IPython/zmq/pylab/backend_payload_svg.py +++ b/IPython/zmq/pylab/backend_payload_svg.py @@ -14,6 +14,11 @@ def show(): """ figure_manager = Gcf.get_active() if figure_manager is not None: + # Make the background transparent. + # figure_manager.canvas.figure.patch.set_alpha(0.0) + # Set the background to white instead so it looks good on black. + figure_manager.canvas.figure.set_facecolor('white') + figure_manager.canvas.figure.set_edgecolor('white') data = svg_from_canvas(figure_manager.canvas) add_plot_payload('svg', data)