aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/experimental/lumina-terminal/TerminalWidget.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2019-10-29 08:16:05 -0400
committerGitHub <noreply@github.com>2019-10-29 08:16:05 -0400
commitbbf4e940ff2e1c257ffd78c10d85b3681eb72f46 (patch)
tree480c429c743606f09a837ebc652ca57a69c42119 /src-qt5/experimental/lumina-terminal/TerminalWidget.cpp
parentMerge pull request #705 from lbartoletti/shortcut_lumina_photo (diff)
parentremove QSignalMapper. Use lambda func instead. (diff)
downloadlumina-bbf4e940ff2e1c257ffd78c10d85b3681eb72f46.tar.gz
lumina-bbf4e940ff2e1c257ffd78c10d85b3681eb72f46.tar.bz2
lumina-bbf4e940ff2e1c257ffd78c10d85b3681eb72f46.zip
Merge pull request #706 from lbartoletti/fix_deprecated
Fix deprecated
Diffstat (limited to 'src-qt5/experimental/lumina-terminal/TerminalWidget.cpp')
-rw-r--r--src-qt5/experimental/lumina-terminal/TerminalWidget.cpp4
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
bgstack15