1
0
Fork 0
forked from len0rd/rockbox

Theme Editor: Working on image rendering

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27083 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Bieber 2010-06-23 07:18:22 +00:00
parent a937b8ba05
commit d3027053f9
5 changed files with 113 additions and 15 deletions

View file

@ -37,6 +37,7 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info)
/* Default viewport takes up the entire screen */
size = QRectF(0, 0, info.screen()->getWidth(),
info.screen()->getHeight());
customUI = false;
if(info.model()->rowCount(QModelIndex()) > 1)
{
@ -122,8 +123,9 @@ QRectF RBViewport::boundingRect() const
void RBViewport::paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
{
QColor color = customUI ? Qt::blue : Qt::red;
painter->fillRect(size, color);
painter->setBrush(Qt::NoBrush);
painter->setPen(customUI ? Qt::blue : Qt::red);
painter->drawRect(size);
}
/* Called at the end of a logical line */