diff options
| author | Robert Bieber <robby@bieberphoto.com> | 2010-06-08 07:57:43 +0000 |
|---|---|---|
| committer | Robert Bieber <robby@bieberphoto.com> | 2010-06-08 07:57:43 +0000 |
| commit | 0cc507214ab3d5c35512add1e6150c4042e0aa1c (patch) | |
| tree | 6a78263259233b95cf236f3d700372d489c46ae6 /utils/themeeditor/skindocument.cpp | |
| parent | fa99c614b90c17c79f75b54a68e311324eda4184 (diff) | |
| download | rockbox-0cc507214ab3d5c35512add1e6150c4042e0aa1c.zip rockbox-0cc507214ab3d5c35512add1e6150c4042e0aa1c.tar.gz rockbox-0cc507214ab3d5c35512add1e6150c4042e0aa1c.tar.bz2 rockbox-0cc507214ab3d5c35512add1e6150c4042e0aa1c.tar.xz | |
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.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/themeeditor/skindocument.cpp b/utils/themeeditor/skindocument.cpp index 3da248a..f7c902f 100644 --- a/utils/themeeditor/skindocument.cpp +++ b/utils/themeeditor/skindocument.cpp @@ -52,6 +52,7 @@ SkinDocument::SkinDocument(QLabel* statusLabel, QString file, QWidget *parent): fin.open(QFile::ReadOnly); editor->document()->setPlainText(QString(fin.readAll())); saved = editor->document()->toPlainText(); + editor->setTextCursor(QTextCursor(editor->document()->begin())); fin.close(); } @@ -113,7 +114,7 @@ void SkinDocument::setupUI() { /* Setting up the text edit */ layout = new QHBoxLayout; - editor = new QPlainTextEdit(this); + editor = new CodeEditor(this); editor->setLineWrapMode(QPlainTextEdit::NoWrap); layout->addWidget(editor); |