mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-17 12:07:38 -04:00
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
This commit is contained in:
parent
fa99c614b9
commit
0cc507214a
5 changed files with 250 additions and 5 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue