diff options
Diffstat (limited to 'src-qt5/experimental/lumina-terminal')
-rw-r--r-- | src-qt5/experimental/lumina-terminal/TerminalWidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src-qt5/experimental/lumina-terminal/TerminalWidget.cpp b/src-qt5/experimental/lumina-terminal/TerminalWidget.cpp index 9fe4f15e..43523f15 100644 --- a/src-qt5/experimental/lumina-terminal/TerminalWidget.cpp +++ b/src-qt5/experimental/lumina-terminal/TerminalWidget.cpp @@ -29,7 +29,7 @@ TerminalWidget::TerminalWidget(QWidget *parent, QString dir) : QTextEdit(parent) this->setAcceptRichText(false); this->setOverwriteMode(true); this->setFocusPolicy(Qt::StrongFocus); - this->setTabStopWidth( 8 * this->fontMetrics().width(" ") ); //8 character spaces per tab (UNIX standard) + this->setTabStopWidth( 8 * this->fontMetrics().horizontalAdvance(" ") ); //8 character spaces per tab (UNIX standard) this->setTabChangesFocus(false); //this->setWordWrapMode(QTextOption::NoWrap); this->setContextMenuPolicy(Qt::CustomContextMenu); @@ -537,7 +537,7 @@ void TerminalWidget::updateTermSize(){ if(!PROC->isOpen()){ return; } QSize pix = this->size(); //pixels QSize chars; - chars.setWidth( pix.width()/this->fontMetrics().width("W") ); + chars.setWidth( pix.width()/this->fontMetrics().horizontalAdvance("W") ); chars.setHeight( pix.height()/this->fontMetrics().lineSpacing() ); //qDebug() << "Set Terminal Size:" << chars << pix; if(chars.width() <2 || chars.height() <2){ return; } //skip this - cannot go less than 2 characters wide/high |