Repository: spyder-ide/spyder

Issue:
Backgroud color of Plotwidget in dark theme
<!--- **PLEASE READ:** When submitting here, please ensure you've completed the following checklist and checked the boxes to confirm. Issue reports without it may be closed. Thanks! --->

## Problem Description
The background color of the plot widget becomes white after click "remove images".  

![plot_wiget_color_error](https://user-images.githubusercontent.com/22970578/50043351-e2766000-00b5-11e9-9f64-b4ad9e941e08.gif)

So I commented out 758 line of figurebrower.py.

    # self.setStyleSheet("background-color: white")

![plot_wiget_color_correct](https://user-images.githubusercontent.com/22970578/50043374-33865400-00b6-11e9-9161-3bfbb8880c25.gif)


## Versions
<!--- You can get this information from Help > About Spyder...
or (if Spyder won't launch) the "conda list" command
from the Anaconda Prompt/Terminal/command line. --->

* Spyder version: 4.0.0 dev0 (lastest master)
* Python version: 3.6.5
* Qt version: 5.9.5
* PyQt version: 5.9.2
* Operating System name/version: linux(manjaro)/4.19.6


Discussion:
@dalthviz, an easy one for you.

Resolving patch:
diff --git a/spyder/plugins/plots/widgets/figurebrowser.py b/spyder/plugins/plots/widgets/figurebrowser.py
--- a/spyder/plugins/plots/widgets/figurebrowser.py
+++ b/spyder/plugins/plots/widgets/figurebrowser.py
@@ -111,7 +111,8 @@ def setup(self, mute_inline_plotting=None, show_plot_outline=None):
                                      "border-bottom-width: 0px;"
                                      "border-left-width: 0px;"
                                      "}")
-        self.thumbnails_sb = ThumbnailScrollBar(self.figviewer)
+        self.thumbnails_sb = ThumbnailScrollBar(
+            self.figviewer, background_color=self.background_color)
 
         # Option actions :
         self.setup_option_actions(mute_inline_plotting, show_plot_outline)
@@ -321,6 +322,7 @@ def __init__(self, parent=None, background_color=None):
                 "background-color: {}".format(background_color))
         self.setFrameStyle(0)
 
+        self.background_color = background_color
         self._scalefactor = 0
         self._scalestep = 1.2
         self._sfmax = 10
@@ -333,7 +335,7 @@ def __init__(self, parent=None, background_color=None):
 
     def setup_figcanvas(self):
         """Setup the FigureCanvas."""
-        self.figcanvas = FigureCanvas()
+        self.figcanvas = FigureCanvas(background_color=self.background_color)
         self.figcanvas.installEventFilter(self)
         self.setWidget(self.figcanvas)
 
@@ -445,9 +447,10 @@ class ThumbnailScrollBar(QFrame):
     """
     redirect_stdio = Signal(bool)
 
-    def __init__(self, figure_viewer, parent=None):
+    def __init__(self, figure_viewer, parent=None, background_color=None):
         super(ThumbnailScrollBar, self).__init__(parent)
         self._thumbnails = []
+        self.background_color = background_color
         self.current_thumbnail = None
         self.set_figureviewer(figure_viewer)
         self.setup_gui()
@@ -571,7 +574,7 @@ def save_figure_as(self, fig, fmt):
 
     # ---- Thumbails Handlers
     def add_thumbnail(self, fig, fmt):
-        thumbnail = FigureThumbnail()
+        thumbnail = FigureThumbnail(background_color=self.background_color)
         thumbnail.canvas.load_figure(fig, fmt)
 
         # Scale the thumbnail size, while respecting the figure
@@ -675,9 +678,9 @@ class FigureThumbnail(QWidget):
     sig_remove_figure = Signal(object)
     sig_save_figure = Signal(object, str)
 
-    def __init__(self, parent=None):
+    def __init__(self, parent=None, background_color=None):
         super(FigureThumbnail, self).__init__(parent)
-        self.canvas = FigureCanvas(self)
+        self.canvas = FigureCanvas(self, background_color=background_color)
         self.canvas.installEventFilter(self)
         self.setup_gui()
 
@@ -751,11 +754,11 @@ class FigureCanvas(QFrame):
     A basic widget on which can be painted a custom png, jpg, or svg image.
     """
 
-    def __init__(self, parent=None):
+    def __init__(self, parent=None, background_color=None):
         super(FigureCanvas, self).__init__(parent)
         self.setLineWidth(2)
         self.setMidLineWidth(1)
-        self.setStyleSheet("background-color: white")
+        self.setStyleSheet("background-color: {}".format(background_color))
 
         self.fig = None
         self.fmt = None


Test patch: