mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08:00
fix for reader flashing
This commit is contained in:
parent
3a76f2e66c
commit
08db998667
1 changed files with 4 additions and 0 deletions
|
@ -1309,6 +1309,9 @@ void reader::setTextProperties(int alignment, int lineSpacing, int margins, QStr
|
||||||
QTextCursor cursor = ui->text->textCursor();
|
QTextCursor cursor = ui->text->textCursor();
|
||||||
textDialogLock = true;
|
textDialogLock = true;
|
||||||
// Kudos to Qt for not implementing the opposite of the following function /)_-)
|
// Kudos to Qt for not implementing the opposite of the following function /)_-)
|
||||||
|
|
||||||
|
ui->text->setStyleSheet("QTextEdit { selection-background-color: white }");
|
||||||
|
|
||||||
ui->text->selectAll();
|
ui->text->selectAll();
|
||||||
if(alignment == 0) {
|
if(alignment == 0) {
|
||||||
ui->text->setAlignment(Qt::AlignLeft);
|
ui->text->setAlignment(Qt::AlignLeft);
|
||||||
|
@ -1428,6 +1431,7 @@ void reader::setTextProperties(int alignment, int lineSpacing, int margins, QStr
|
||||||
keyCount++;
|
keyCount++;
|
||||||
}
|
}
|
||||||
htmlText.replace(QRegExp("font-family:'.*';"), "");
|
htmlText.replace(QRegExp("font-family:'.*';"), "");
|
||||||
|
ui->text->setStyleSheet("QTextEdit { selection-background-color: black }");
|
||||||
ui->text->setHtml(htmlText);
|
ui->text->setHtml(htmlText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue