diff options
-rw-r--r-- | utils/themeeditor/graphics/rbscreen.cpp | 6 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbscreen.h | 5 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.cpp | 6 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.h | 5 | ||||
-rw-r--r-- | utils/themeeditor/models/parsetreenode.cpp | 19 | ||||
-rw-r--r-- | utils/themeeditor/resources.qrc | 1 | ||||
-rw-r--r-- | utils/themeeditor/resources/render/statusbar.png | bin | 0 -> 242 bytes | |||
-rw-r--r-- | utils/themeeditor/themeeditor.pro | 4 |
8 files changed, 43 insertions, 3 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 @@ | |||
29 | RBScreen::RBScreen(const RBRenderInfo& info, bool remote, | 29 | RBScreen::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 | ||
121 | void RBScreen::loadViewport(QString name, RBViewport *view) | 125 | void 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 | ||
87 | private: | 89 | private: |
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 | ||
145 | void RBViewport::newLine() | 149 | void 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 | |||
60 | private: | 62 | private: |
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 |
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp index 3b334a6f99..300d5195de 100644 --- a/utils/themeeditor/models/parsetreenode.cpp +++ b/utils/themeeditor/models/parsetreenode.cpp | |||
@@ -611,6 +611,25 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport) | |||
611 | 611 | ||
612 | return false; | 612 | return false; |
613 | 613 | ||
614 | case 'w': | ||
615 | switch(element->tag->name[1]) | ||
616 | { | ||
617 | case 'd': | ||
618 | info.screen()->disableStatusBar(); | ||
619 | return true; | ||
620 | |||
621 | case 'e': | ||
622 | info.screen()->enableStatusBar(); | ||
623 | return true; | ||
624 | |||
625 | case 'i': | ||
626 | info.screen()->disableStatusBar(); | ||
627 | viewport->enableStatusBar(); | ||
628 | return true; | ||
629 | } | ||
630 | |||
631 | return false; | ||
632 | |||
614 | case 'x': | 633 | case 'x': |
615 | switch(element->tag->name[1]) | 634 | switch(element->tag->name[1]) |
616 | { | 635 | { |
diff --git a/utils/themeeditor/resources.qrc b/utils/themeeditor/resources.qrc index a1c545bbb1..ad892d7853 100644 --- a/utils/themeeditor/resources.qrc +++ b/utils/themeeditor/resources.qrc | |||
@@ -13,5 +13,6 @@ | |||
13 | <qresource prefix="/render"> | 13 | <qresource prefix="/render"> |
14 | <file alias="scenebg.png">resources/render/scenebg.png</file> | 14 | <file alias="scenebg.png">resources/render/scenebg.png</file> |
15 | <file alias="albumart.png">resources/render/albumart.png</file> | 15 | <file alias="albumart.png">resources/render/albumart.png</file> |
16 | <file alias="statusbar.png">resources/render/statusbar.png</file> | ||
16 | </qresource> | 17 | </qresource> |
17 | </RCC> | 18 | </RCC> |
diff --git a/utils/themeeditor/resources/render/statusbar.png b/utils/themeeditor/resources/render/statusbar.png new file mode 100644 index 0000000000..06307b7d28 --- /dev/null +++ b/utils/themeeditor/resources/render/statusbar.png | |||
Binary files differ | |||
diff --git a/utils/themeeditor/themeeditor.pro b/utils/themeeditor/themeeditor.pro index a46c40b451..1e66faf88e 100644 --- a/utils/themeeditor/themeeditor.pro +++ b/utils/themeeditor/themeeditor.pro | |||
@@ -72,7 +72,9 @@ OTHER_FILES += README \ | |||
72 | resources/document-save.png \ | 72 | resources/document-save.png \ |
73 | resources/document-open.png \ | 73 | resources/document-open.png \ |
74 | resources/document-new.png \ | 74 | resources/document-new.png \ |
75 | resources/deviceoptions | 75 | resources/deviceoptions \ |
76 | resources/render/statusbar.png \ | ||
77 | resources/render/scenebg.png | ||
76 | FORMS += gui/editorwindow.ui \ | 78 | FORMS += gui/editorwindow.ui \ |
77 | gui/preferencesdialog.ui \ | 79 | gui/preferencesdialog.ui \ |
78 | gui/configdocument.ui \ | 80 | gui/configdocument.ui \ |