summaryrefslogtreecommitdiff
path: root/utils/themeeditor/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/graphics')
-rw-r--r--utils/themeeditor/graphics/rbscreen.cpp6
-rw-r--r--utils/themeeditor/graphics/rbscreen.h5
-rw-r--r--utils/themeeditor/graphics/rbviewport.cpp6
-rw-r--r--utils/themeeditor/graphics/rbviewport.h5
4 files changed, 20 insertions, 2 deletions
diff --git a/utils/themeeditor/graphics/rbscreen.cpp b/utils/themeeditor/graphics/rbscreen.cpp
index 924a37406e..cb69afd906 100644
--- a/utils/themeeditor/graphics/rbscreen.cpp
+++ b/utils/themeeditor/graphics/rbscreen.cpp
@@ -29,7 +29,8 @@
29RBScreen::RBScreen(const RBRenderInfo& info, bool remote, 29RBScreen::RBScreen(const RBRenderInfo& info, bool remote,
30 QGraphicsItem *parent) 30 QGraphicsItem *parent)
31 :QGraphicsItem(parent), backdrop(0), project(project), 31 :QGraphicsItem(parent), backdrop(0), project(project),
32 albumArt(0) 32 albumArt(0), defaultStatusBar(true),
33 statusBarTexture(":/render/statusbar.png")
33{ 34{
34 35
35 if(remote) 36 if(remote)
@@ -116,6 +117,9 @@ void RBScreen::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
116 { 117 {
117 painter->fillRect(0, 0, width, height, bgColor); 118 painter->fillRect(0, 0, width, height, bgColor);
118 } 119 }
120
121 if(defaultStatusBar)
122 painter->fillRect(QRectF(0, 0, width, 8), statusBarTexture);
119} 123}
120 124
121void RBScreen::loadViewport(QString name, RBViewport *view) 125void RBScreen::loadViewport(QString name, RBViewport *view)
diff --git a/utils/themeeditor/graphics/rbscreen.h b/utils/themeeditor/graphics/rbscreen.h
index 358a49e4a7..58788d463b 100644
--- a/utils/themeeditor/graphics/rbscreen.h
+++ b/utils/themeeditor/graphics/rbscreen.h
@@ -83,6 +83,8 @@ public:
83 } 83 }
84 } 84 }
85 85
86 void disableStatusBar(){ defaultStatusBar = false; }
87 void enableStatusBar(){ defaultStatusBar = true; }
86 88
87private: 89private:
88 int width; 90 int width;
@@ -102,6 +104,9 @@ private:
102 104
103 RBAlbumArt* albumArt; 105 RBAlbumArt* albumArt;
104 106
107 bool defaultStatusBar;
108 QPixmap statusBarTexture;
109
105}; 110};
106 111
107#endif // RBSCREEN_H 112#endif // RBSCREEN_H
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp
index 22b2ada158..4b85a30661 100644
--- a/utils/themeeditor/graphics/rbviewport.cpp
+++ b/utils/themeeditor/graphics/rbviewport.cpp
@@ -33,7 +33,8 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info)
33 : QGraphicsItem(info.screen()), font(info.screen()->getFont(0)), 33 : QGraphicsItem(info.screen()), font(info.screen()->getFont(0)),
34 foreground(info.screen()->foreground()), 34 foreground(info.screen()->foreground()),
35 background(info.screen()->background()), textOffset(0,0), 35 background(info.screen()->background()), textOffset(0,0),
36 screen(info.screen()), textAlign(Left) 36 screen(info.screen()), textAlign(Left), showStatusBar(false),
37 statusBarTexture(":/render/statusbar.png")
37{ 38{
38 if(!node->tag) 39 if(!node->tag)
39 { 40 {
@@ -140,6 +141,9 @@ void RBViewport::paint(QPainter *painter,
140 painter->setPen(customUI ? Qt::blue : Qt::red); 141 painter->setPen(customUI ? Qt::blue : Qt::red);
141 if(debug) 142 if(debug)
142 painter->drawRect(size); 143 painter->drawRect(size);
144
145 if(showStatusBar)
146 painter->fillRect(QRectF(0, 0, size.width(), 8), statusBarTexture);
143} 147}
144 148
145void RBViewport::newLine() 149void RBViewport::newLine()
diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h
index 1d65eb8d56..2aff315873 100644
--- a/utils/themeeditor/graphics/rbviewport.h
+++ b/utils/themeeditor/graphics/rbviewport.h
@@ -57,6 +57,8 @@ public:
57 void write(QString text); 57 void write(QString text);
58 void alignText(Alignment align){ textAlign = align; } 58 void alignText(Alignment align){ textAlign = align; }
59 59
60 void enableStatusBar(){ showStatusBar = true; }
61
60private: 62private:
61 63
62 void alignLeft(); 64 void alignLeft();
@@ -79,6 +81,9 @@ private:
79 QList<QGraphicsItem*> centerText; 81 QList<QGraphicsItem*> centerText;
80 QList<QGraphicsItem*> rightText; 82 QList<QGraphicsItem*> rightText;
81 Alignment textAlign; 83 Alignment textAlign;
84
85 bool showStatusBar;
86 QPixmap statusBarTexture;
82}; 87};
83 88
84#endif // RBVIEWPORT_H 89#endif // RBVIEWPORT_H