diff options
Diffstat (limited to 'utils/themeeditor/graphics/rbviewport.cpp')
-rw-r--r-- | utils/themeeditor/graphics/rbviewport.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp index 4b85a30661..138a6b52bc 100644 --- a/utils/themeeditor/graphics/rbviewport.cpp +++ b/utils/themeeditor/graphics/rbviewport.cpp | |||
@@ -93,17 +93,25 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info) | |||
93 | } | 93 | } |
94 | /* Now we grab the info common to all viewports */ | 94 | /* Now we grab the info common to all viewports */ |
95 | x = node->params[param++].data.numeric; | 95 | x = node->params[param++].data.numeric; |
96 | if(x < 0) | ||
97 | x = info.screen()->boundingRect().right() + x; | ||
96 | y = node->params[param++].data.numeric; | 98 | y = node->params[param++].data.numeric; |
99 | if(y < 0) | ||
100 | y = info.screen()->boundingRect().bottom() + y; | ||
97 | 101 | ||
98 | if(node->params[param].type == skin_tag_parameter::DEFAULT) | 102 | if(node->params[param].type == skin_tag_parameter::DEFAULT) |
99 | w = info.screen()->getWidth() - x; | 103 | w = info.screen()->getWidth() - x; |
100 | else | 104 | else |
101 | w = node->params[param].data.numeric; | 105 | w = node->params[param].data.numeric; |
106 | if(w < 0) | ||
107 | w = info.screen()->getWidth() + w - x; | ||
102 | 108 | ||
103 | if(node->params[++param].type == skin_tag_parameter::DEFAULT) | 109 | if(node->params[++param].type == skin_tag_parameter::DEFAULT) |
104 | h = info.screen()->getHeight() - y; | 110 | h = info.screen()->getHeight() - y; |
105 | else | 111 | else |
106 | h = node->params[param].data.numeric; | 112 | h = node->params[param].data.numeric; |
113 | if(h < 0) | ||
114 | h = info.screen()->getHeight() + h - y; | ||
107 | 115 | ||
108 | setPos(x, y); | 116 | setPos(x, y); |
109 | size = QRectF(0, 0, w, h); | 117 | size = QRectF(0, 0, w, h); |