summaryrefslogtreecommitdiff
path: root/utils/themeeditor/skindocument.cpp
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-08 07:57:43 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-08 07:57:43 +0000
commit0cc507214ab3d5c35512add1e6150c4042e0aa1c (patch)
tree6a78263259233b95cf236f3d700372d489c46ae6 /utils/themeeditor/skindocument.cpp
parentfa99c614b90c17c79f75b54a68e311324eda4184 (diff)
downloadrockbox-0cc507214ab3d5c35512add1e6150c4042e0aa1c.tar.gz
rockbox-0cc507214ab3d5c35512add1e6150c4042e0aa1c.zip
Theme Editor: Added line numbering in the text editor, thanks to some code from Nokia. Also made newly opened documents scroll to the top of the document after loading
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26683 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/skindocument.cpp')
-rw-r--r--utils/themeeditor/skindocument.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/themeeditor/skindocument.cpp b/utils/themeeditor/skindocument.cpp
index 3da248a30b..f7c902f30f 100644
--- a/utils/themeeditor/skindocument.cpp
+++ b/utils/themeeditor/skindocument.cpp
@@ -52,6 +52,7 @@ SkinDocument::SkinDocument(QLabel* statusLabel, QString file, QWidget *parent):
52 fin.open(QFile::ReadOnly); 52 fin.open(QFile::ReadOnly);
53 editor->document()->setPlainText(QString(fin.readAll())); 53 editor->document()->setPlainText(QString(fin.readAll()));
54 saved = editor->document()->toPlainText(); 54 saved = editor->document()->toPlainText();
55 editor->setTextCursor(QTextCursor(editor->document()->begin()));
55 fin.close(); 56 fin.close();
56 } 57 }
57 58
@@ -113,7 +114,7 @@ void SkinDocument::setupUI()
113{ 114{
114 /* Setting up the text edit */ 115 /* Setting up the text edit */
115 layout = new QHBoxLayout; 116 layout = new QHBoxLayout;
116 editor = new QPlainTextEdit(this); 117 editor = new CodeEditor(this);
117 editor->setLineWrapMode(QPlainTextEdit::NoWrap); 118 editor->setLineWrapMode(QPlainTextEdit::NoWrap);
118 layout->addWidget(editor); 119 layout->addWidget(editor);
119 120