Ticket #3068: mythvideopatch.txt

File mythvideopatch.txt, 1.6 KB (added by justin.hornsby@…, 5 years ago)
Line 
1Index: mythvideo/mythvideo/videogallery.h
2===================================================================
3--- mythvideo/mythvideo/videogallery.h  (revision 12758)
4+++ mythvideo/mythvideo/videogallery.h  (working copy)
5@@ -56,6 +56,7 @@
6     void positionIcon();
7
8     void computeLastRowCol(int list_count);
9+    void drawBackground();
10
11   private:
12     bool subtitleOn;
13@@ -69,7 +70,7 @@
14     QPixmap backSelPix;
15     QPixmap folderRegPix;
16     QPixmap folderSelPix;
17-
18+    QPixmap myBackground;
19     int currRow;
20     int currCol;
21     int lastRow;
22Index: mythvideo/mythvideo/videogallery.cpp
23===================================================================
24--- mythvideo/mythvideo/videogallery.cpp        (revision 12758)
25+++ mythvideo/mythvideo/videogallery.cpp        (working copy)
26@@ -41,6 +41,9 @@
27     keepAspectRatio = gContext->GetNumSetting("VideoGalleryAspectRatio", 1);
28
29     loadWindow(xmldata);
30+
31+    drawBackground(); // draw the background
32+
33     LoadIconWindow(); // load icon settings
34
35     fetchVideos();
36@@ -266,6 +269,7 @@
37
38 void VideoGallery::updateView(QPainter *p)
39 {
40+
41     //
42     // Draw all video icons
43     //
44@@ -877,3 +881,20 @@
45     else if (container_name == "arrows")
46         arrowsRect = area;
47 }
48+
49+void VideoGallery::drawBackground(void)
50+{
51+    QPixmap bground(size());
52+    bground.fill(this, 0, 0);
53+
54+    QPainter tmp(&bground);
55+
56+    LayerSet *container = theme->GetSet("background");
57+    if (container)
58+        container->Draw(&tmp, 0, 0);
59+
60+        tmp.end();
61+        myBackground = bground;
62+
63+    setPaletteBackgroundPixmap(myBackground);
64+}