summaryrefslogtreecommitdiffstats
path: root/pyanaconda
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2012-02-24 10:32:35 -0500
committerChris Lumens <clumens@redhat.com>2012-02-24 10:36:10 -0500
commitd455e8ec453fad7b1814be29375ec3dd163fa347 (patch)
tree7cc40593f958f7364fa7334ab0adecbfd031af95 /pyanaconda
parent7f7653a3bdfe28c1f379d0cdc00db2c1868318b2 (diff)
downloadanaconda-d455e8ec453fad7b1814be29375ec3dd163fa347.tar.gz
anaconda-d455e8ec453fad7b1814be29375ec3dd163fa347.tar.xz
anaconda-d455e8ec453fad7b1814be29375ec3dd163fa347.zip
Set the background of the autodetected media viewport to background color.
Diffstat (limited to 'pyanaconda')
-rw-r--r--pyanaconda/ui/gui/spokes/source.py11
-rw-r--r--pyanaconda/ui/gui/spokes/source.ui2
2 files changed, 12 insertions, 1 deletions
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 67de10a55..b27179322 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -212,6 +212,7 @@ class SourceSpoke(NormalSpoke):
self._verifyIsoButton = self.builder.get_object("verifyIsoButton")
def initialize(self):
+ from gi.repository import Gtk
from pyanaconda.threads import threadMgr
from threading import Thread
@@ -225,6 +226,16 @@ class SourceSpoke(NormalSpoke):
self._isoButton.connect("toggled", self.on_source_toggled, self._isoBox)
self._networkButton.connect("toggled", self.on_source_toggled, self._networkBox)
+ # We want the background of the viewport containing autodetected media
+ # to have the same color as the background of the main window.
+ viewport = self.builder.get_object("autodetectViewport")
+
+ provider = Gtk.CssProvider()
+ provider.load_from_data("GtkViewport { background-color: @theme_bg_color }")
+
+ context = viewport.get_style_context()
+ context.add_provider(provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
+
threadMgr.add(Thread(name="AnaSourceWatcher", target=self._initialize))
def _initialize(self):
diff --git a/pyanaconda/ui/gui/spokes/source.ui b/pyanaconda/ui/gui/spokes/source.ui
index 5f0c2598d..e11d79a29 100644
--- a/pyanaconda/ui/gui/spokes/source.ui
+++ b/pyanaconda/ui/gui/spokes/source.ui
@@ -297,7 +297,7 @@
<property name="vscrollbar_policy">never</property>
<property name="shadow_type">out</property>
<child>
- <object class="GtkViewport" id="viewport1">
+ <object class="GtkViewport" id="autodetectViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">out</property>