From 25ffa414af21a7b01ce9ce7a8279ae7c93366ab1 Mon Sep 17 00:00:00 2001 From: DaTweety <129504390+DaTweety@users.noreply.github.com> Date: Mon, 19 Oct 2026 22:40:05 +0200 Subject: [PATCH] Place symbol texts: bigger bars in the icons, bigger grid buttons Co-Authored-By: Claude Opus 5.5 --- sources/qetdiagrameditor.cpp | 4 ++-- sources/symboltextplacement.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index 34bf5a2f9..0b3c27b89 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -523,10 +523,10 @@ void QETDiagramEditor::setUpActions() { auto *button = new QToolButton(grid_widget); button->setIcon(SymbolTextPlacement::icon(point.where)); - button->setIconSize(QSize(24, 24)); + button->setIconSize(QSize(32, 32)); button->setToolTip(tr(point.tip)); button->setObjectName(QStringLiteral("place_texts_%1").arg(n)); - button->setFixedSize(28, 28); + button->setFixedSize(38, 38); button->setAutoRaise(true); const Qt::Alignment where = point.where; connect(button, &QToolButton::clicked, this, [this, menu, where]() { diff --git a/sources/symboltextplacement.cpp b/sources/symboltextplacement.cpp index 7dfec5033..871a971bd 100644 --- a/sources/symboltextplacement.cpp +++ b/sources/symboltextplacement.cpp @@ -148,12 +148,12 @@ QIcon SymbolTextPlacement::icon(Qt::Alignment where) //The symbol painter.setPen(Qt::NoPen); painter.setBrush(palette.color(QPalette::Mid)); - painter.drawRect(QRectF(7, 7, 10, 10)); + painter.drawRect(QRectF(8, 8, 8, 8)); //Two lines of text, a long one over a short one - const qreal right = (where & Qt::AlignLeft) ? 5.5 : (where & Qt::AlignRight) ? 24 : 18.5; - const qreal left = (where & Qt::AlignLeft) ? 0 : (where & Qt::AlignRight) ? 18.5 : 5.5; - const qreal top = (where & Qt::AlignTop) ? 0 : (where & Qt::AlignBottom) ? 18.5 : 9.25; + const qreal right = (where & Qt::AlignLeft) ? 6.8 : (where & Qt::AlignRight) ? 24 : 19; + const qreal left = (where & Qt::AlignLeft) ? 0 : (where & Qt::AlignRight) ? 17.2 : 5; + const qreal top = (where & Qt::AlignTop) ? 0 : (where & Qt::AlignBottom) ? 16.6 : 8.3; painter.setBrush(palette.color(QPalette::WindowText)); for (int i = 0; i < 2; ++i) { @@ -161,7 +161,7 @@ QIcon SymbolTextPlacement::icon(Qt::Alignment where) const qreal x = lines == Qt::AlignRight ? right - width : lines == Qt::AlignLeft ? left : (left + right - width) / 2; - painter.drawRect(QRectF(x, top + i * 3, width, 2.5)); + painter.drawRect(QRectF(x, top + i * 4.2, width, 3.2)); } painter.end(); icon.addPixmap(pixmap);