Update terminal name

This commit is contained in:
Kellermorph
2026-07-10 14:36:47 +02:00
parent c884d32dbe
commit f62ce7e4ca
2 changed files with 19 additions and 2 deletions
+17
View File
@@ -1,3 +1,20 @@
/*
Copyright 2006-2026 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "terminaleditor.h"
#include "ui_terminaleditor.h"
#include "../../qeticons.h"
+2 -2
View File
@@ -280,7 +280,7 @@ void Terminal::paint(
painter->setFont(d->m_label_font);
painter->setPen(d->m_label_color);
QPointF label_pos = d->m_label_pos;
QPointF label_pos = d->m_pos + d->m_label_pos;
QFontMetrics fm(d->m_label_font);
QSizeF text_size = fm.size(Qt::TextSingleLine, d->m_name);
@@ -384,7 +384,7 @@ QRectF Terminal::boundingRect() const {
QFontMetrics fm(d->m_label_font);
QSizeF text_size = fm.size(Qt::TextSingleLine, d->m_name);
QPointF label_pos = d->m_label_pos;
QPointF label_pos = d->m_pos + d->m_label_pos;
qreal dx = 0, dy = 0;
if (d->m_label_halignment & Qt::AlignLeft) dx = 0;