mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-01 17:14:13 +02:00
Update terminal name
This commit is contained in:
@@ -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 "terminaleditor.h"
|
||||||
#include "ui_terminaleditor.h"
|
#include "ui_terminaleditor.h"
|
||||||
#include "../../qeticons.h"
|
#include "../../qeticons.h"
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ void Terminal::paint(
|
|||||||
painter->setFont(d->m_label_font);
|
painter->setFont(d->m_label_font);
|
||||||
painter->setPen(d->m_label_color);
|
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);
|
QFontMetrics fm(d->m_label_font);
|
||||||
QSizeF text_size = fm.size(Qt::TextSingleLine, d->m_name);
|
QSizeF text_size = fm.size(Qt::TextSingleLine, d->m_name);
|
||||||
|
|
||||||
@@ -384,7 +384,7 @@ QRectF Terminal::boundingRect() const {
|
|||||||
|
|
||||||
QFontMetrics fm(d->m_label_font);
|
QFontMetrics fm(d->m_label_font);
|
||||||
QSizeF text_size = fm.size(Qt::TextSingleLine, d->m_name);
|
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;
|
qreal dx = 0, dy = 0;
|
||||||
if (d->m_label_halignment & Qt::AlignLeft) dx = 0;
|
if (d->m_label_halignment & Qt::AlignLeft) dx = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user