forked from len0rd/rockbox
Theme Editor: Fixed rendering behavior of default viewport. Now when other viewports are present in the skin, only _text_ from the default viewport is not rendered
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27378 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a6df932003
commit
364af4f574
2 changed files with 9 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info)
|
|||
if(info.model()->rowCount(QModelIndex()) > 1)
|
||||
{
|
||||
/* If there is more than one viewport in the document */
|
||||
setVisible(false);
|
||||
textOffset.setX(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -175,6 +175,9 @@ void RBViewport::paint(QPainter *painter,
|
|||
|
||||
void RBViewport::newLine()
|
||||
{
|
||||
if(textOffset.x() < 0)
|
||||
return;
|
||||
|
||||
if(leftText != "")
|
||||
alignLeft();
|
||||
|
||||
|
|
@ -201,6 +204,9 @@ void RBViewport::newLine()
|
|||
|
||||
void RBViewport::write(QString text)
|
||||
{
|
||||
if(textOffset.x() < 0)
|
||||
return;
|
||||
|
||||
if(textAlign == Left)
|
||||
{
|
||||
leftText.append(text);
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ public:
|
|||
void addTextOffset(int height){ textOffset.setY(textOffset.y() + height); }
|
||||
void flushText()
|
||||
{
|
||||
if(textOffset.x() < 0)
|
||||
return;
|
||||
alignLeft();
|
||||
alignRight();
|
||||
alignCenter();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue