summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/models
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-17 20:44:11 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-17 20:44:11 +0000
commit02c377469a00ae0634b3269935ce5fa186e0ee58 (patch)
treebf60f59b02160e153171c4877699c4c54fea30cd /utils/themeeditor/models
parent60200755512e0b2c0758ac3697f06194e9809f40 (diff)
downloadrockbox-02c377469a00ae0634b3269935ce5fa186e0ee58.tar.gz
rockbox-02c377469a00ae0634b3269935ce5fa186e0ee58.zip
Theme Editor: Continuing work on rendering, skin preview will now show backdrop or background color depending on config file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26900 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/models')
-rw-r--r--utils/themeeditor/models/parsetreemodel.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/utils/themeeditor/models/parsetreemodel.cpp b/utils/themeeditor/models/parsetreemodel.cpp
index 0b80416d3a..762443f4a5 100644
--- a/utils/themeeditor/models/parsetreemodel.cpp
+++ b/utils/themeeditor/models/parsetreemodel.cpp
@@ -22,10 +22,12 @@
#include "parsetreemodel.h"
#include "symbols.h"
+#include "rbscreen.h"
#include <cstdlib>
#include <QObject>
+#include <QPixmap>
ParseTreeModel::ParseTreeModel(const char* document, QObject* parent):
QAbstractItemModel(parent)
@@ -271,10 +273,12 @@ QGraphicsScene* ParseTreeModel::render(ProjectModel* project)
{
scene->clear();
- /* First we set the screen size */
- int screenWidth = safeSetting(project, "#screenwidth", "300").toInt();
- int screenHeight = safeSetting(project, "#screenheight", "200").toInt();
- scene->addRect(0, 0, screenWidth, screenHeight);
+ /* Setting the background */
+ scene->setBackgroundBrush(QBrush(QPixmap(":/render/scenebg.png")));
+
+ /* Adding the screen */
+ RBScreen* screen = new RBScreen(project);
+ scene->addItem(screen);
return scene;
}