diff options
Diffstat (limited to 'utils/themeeditor/graphics')
-rw-r--r-- | utils/themeeditor/graphics/rbscreen.cpp | 22 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbscreen.h | 3 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.cpp | 5 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.h | 1 |
4 files changed, 19 insertions, 12 deletions
diff --git a/utils/themeeditor/graphics/rbscreen.cpp b/utils/themeeditor/graphics/rbscreen.cpp index da6d20bbe8..b93d3c88ad 100644 --- a/utils/themeeditor/graphics/rbscreen.cpp +++ b/utils/themeeditor/graphics/rbscreen.cpp | |||
@@ -26,17 +26,21 @@ | |||
26 | #include <QPainter> | 26 | #include <QPainter> |
27 | #include <QFile> | 27 | #include <QFile> |
28 | 28 | ||
29 | RBScreen::RBScreen(const RBRenderInfo& info, QGraphicsItem *parent) : | 29 | RBScreen::RBScreen(const RBRenderInfo& info, bool remote, |
30 | QGraphicsItem(parent), backdrop(0), project(project) | 30 | QGraphicsItem *parent) |
31 | :QGraphicsItem(parent), backdrop(0), project(project) | ||
31 | { | 32 | { |
32 | 33 | ||
33 | /* | 34 | if(remote) |
34 | width = info.settings()->value("#screenwidth", "300").toInt(); | 35 | { |
35 | height = info.settings()->value("#screenheight", "200").toInt(); | 36 | width = info.device()->data("remotewidth").toInt(); |
36 | */ | 37 | height = info.device()->data("remoteheight").toInt(); |
37 | 38 | } | |
38 | width = info.device()->data("screenwidth").toInt(); | 39 | else |
39 | height = info.device()->data("screenheight").toInt(); | 40 | { |
41 | width = info.device()->data("screenwidth").toInt(); | ||
42 | height = info.device()->data("screenheight").toInt(); | ||
43 | } | ||
40 | 44 | ||
41 | QString bg = info.settings()->value("background color", "FFFFFF"); | 45 | QString bg = info.settings()->value("background color", "FFFFFF"); |
42 | bgColor = stringToColor(bg, Qt::white); | 46 | bgColor = stringToColor(bg, Qt::white); |
diff --git a/utils/themeeditor/graphics/rbscreen.h b/utils/themeeditor/graphics/rbscreen.h index 8b5f2f4a16..25f7c07bd9 100644 --- a/utils/themeeditor/graphics/rbscreen.h +++ b/utils/themeeditor/graphics/rbscreen.h | |||
@@ -35,7 +35,8 @@ class RBScreen : public QGraphicsItem | |||
35 | { | 35 | { |
36 | 36 | ||
37 | public: | 37 | public: |
38 | RBScreen(const RBRenderInfo& info, QGraphicsItem *parent = 0); | 38 | RBScreen(const RBRenderInfo& info, bool remote = false, |
39 | QGraphicsItem *parent = 0); | ||
39 | virtual ~RBScreen(); | 40 | virtual ~RBScreen(); |
40 | 41 | ||
41 | QPainterPath shape() const; | 42 | QPainterPath shape() const; |
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp index 03a7604804..8fa05a2fc7 100644 --- a/utils/themeeditor/graphics/rbviewport.cpp +++ b/utils/themeeditor/graphics/rbviewport.cpp | |||
@@ -105,7 +105,7 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info) | |||
105 | 105 | ||
106 | setPos(x, y); | 106 | setPos(x, y); |
107 | size = QRectF(0, 0, w, h); | 107 | size = QRectF(0, 0, w, h); |
108 | 108 | debug = info.device()->data("showviewports").toBool(); | |
109 | } | 109 | } |
110 | } | 110 | } |
111 | 111 | ||
@@ -135,7 +135,8 @@ void RBViewport::paint(QPainter *painter, | |||
135 | 135 | ||
136 | painter->setBrush(Qt::NoBrush); | 136 | painter->setBrush(Qt::NoBrush); |
137 | painter->setPen(customUI ? Qt::blue : Qt::red); | 137 | painter->setPen(customUI ? Qt::blue : Qt::red); |
138 | painter->drawRect(size); | 138 | if(debug) |
139 | painter->drawRect(size); | ||
139 | } | 140 | } |
140 | 141 | ||
141 | void RBViewport::newLine() | 142 | void RBViewport::newLine() |
diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h index 1ee85f2fcd..c6f0c636c2 100644 --- a/utils/themeeditor/graphics/rbviewport.h +++ b/utils/themeeditor/graphics/rbviewport.h | |||
@@ -56,6 +56,7 @@ private: | |||
56 | QColor foreground; | 56 | QColor foreground; |
57 | QColor background; | 57 | QColor background; |
58 | 58 | ||
59 | bool debug; | ||
59 | bool customUI; | 60 | bool customUI; |
60 | QPoint textOffset; | 61 | QPoint textOffset; |
61 | int lineHeight; | 62 | int lineHeight; |