All pastes #450390 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-20 20:26 UTC
rendered paste body
diff -Naur mythtv-orig/programs/mythfrontend/statusbox.cpp mythtv/programs/mythfrontend/statusbox.cpp
--- mythtv-orig/programs/mythfrontend/statusbox.cpp	2007-04-20 14:39:52.000000000 -0500
+++ mythtv/programs/mythfrontend/statusbox.cpp	2007-04-20 14:37:06.000000000 -0500
@@ -53,7 +53,9 @@
     LoadTheme();
     if (IsErrored())
         return;
-  
+
+    updateBackground();
+
     icon_list->SetItemText(item_count++, QObject::tr("Listings Status"));
     icon_list->SetItemText(item_count++, QObject::tr("Schedule Status"));
     icon_list->SetItemText(item_count++, QObject::tr("Tuner Status"));
@@ -112,6 +114,25 @@
         updateContent();
 }
 
+void StatusBox::updateBackground(void)
+{
+    QPixmap bground(size());
+    bground.fill(this, 0, 0);
+
+    QPainter tmp(&bground);
+
+    LayerSet *container = theme->GetSet("background");
+    if (container)
+    {
+        container->Draw(&tmp, 0, 0);
+    }
+
+    tmp.end();
+    m_Background = bground;
+
+    setPaletteBackgroundPixmap(m_Background);
+}
+
 void StatusBox::updateContent()
 {
     QRect pr = ContentRect;
diff -Naur mythtv-orig/programs/mythfrontend/statusbox.h mythtv/programs/mythfrontend/statusbox.h
--- mythtv-orig/programs/mythfrontend/statusbox.h	2007-04-20 14:39:52.000000000 -0500
+++ mythtv/programs/mythfrontend/statusbox.h	2007-04-20 14:06:31.000000000 -0500
@@ -28,6 +28,7 @@
     void paintEvent(QPaintEvent *e);
 
   private:
+    void updateBackground();
     void updateTopBar();
     void updateSelector();
     void updateContent();
@@ -71,6 +72,8 @@
 
     MythMainWindow *my_parent;
 
+    QPixmap m_Background;
+
     bool isBackend;
     bool errored;
 };