From c215d97b4dfdd08a59af20dacb5178087ee230c5 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Thu, 1 Jul 2010 02:29:58 +0000 Subject: Theme Editor: Made blank lines render newlines in the output git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27206 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/graphics/rbviewport.cpp | 5 +++-- utils/themeeditor/graphics/rbviewport.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'utils/themeeditor/graphics') diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp index 138a6b52bc..2dd272927e 100644 --- a/utils/themeeditor/graphics/rbviewport.cpp +++ b/utils/themeeditor/graphics/rbviewport.cpp @@ -154,11 +154,12 @@ void RBViewport::paint(QPainter *painter, painter->fillRect(QRectF(0, 0, size.width(), 8), statusBarTexture); } -void RBViewport::newLine() +void RBViewport::newLine(bool force) { if(leftText.count() != 0 || centerText.count() != 0 - || rightText.count() != 0) + || rightText.count() != 0 + || force) { textOffset.setY(textOffset.y() + lineHeight); textOffset.setX(0); diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h index 2aff315873..ee7d0540eb 100644 --- a/utils/themeeditor/graphics/rbviewport.h +++ b/utils/themeeditor/graphics/rbviewport.h @@ -53,7 +53,7 @@ public: void makeCustomUI(){ customUI = true; } void clearCustomUI(){ customUI = false; } - void newLine(); + void newLine(bool force = false); void write(QString text); void alignText(Alignment align){ textAlign = align; } -- cgit v1.2.3