forked from qt-creator/qt-creator
Terminal: Fix "nano" titlebar
QTextLayout ignores trailing spaces, and does not draw their background color. Converting them to Nbsp fixes this. Change-Id: I19a363bcb4792c613eb9c59f7caaa40fa631b937 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
committed by
Cristian Adam
parent
af520667ca
commit
7fc674b566
@@ -101,6 +101,8 @@ void createTextLayout(QTextLayout &textLayout,
|
|||||||
|
|
||||||
if (cell->chars[0] != 0xFFFFFFFF) {
|
if (cell->chars[0] != 0xFFFFFFFF) {
|
||||||
QString ch = QString::fromUcs4(cell->chars);
|
QString ch = QString::fromUcs4(cell->chars);
|
||||||
|
if (ch == ' ')
|
||||||
|
ch = QChar::Nbsp;
|
||||||
if (ch.size() > 0) {
|
if (ch.size() > 0) {
|
||||||
layoutText += ch;
|
layoutText += ch;
|
||||||
} else {
|
} else {
|
||||||
|
@@ -390,6 +390,8 @@ void TerminalWidget::copyToClipboard() const
|
|||||||
.trimmed());
|
.trimmed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
selectedText.replace(QChar::Nbsp, QChar::Space);
|
||||||
|
|
||||||
setClipboardAndSelection(selectedText);
|
setClipboardAndSelection(selectedText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user