From 83bb7e14e07cb96cb07fa55f27800328dd5c7ed4 Mon Sep 17 00:00:00 2001 From: ispyisail Date: Mon, 28 Sep 2026 06:23:33 +1300 Subject: [PATCH] Add the status tip to the S shortcut bar's tooltips too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous commit changed only the bar that appears beside the cursor after a click. The S shortcut bar builds its own tooltips, so its "Orienter les textes" button still said only that. Its tooltips now carry the status tip on a second line as well, after the keyboard shortcut. Checked in the GUI: the S bar's second button shows "Orienter les textes (Ctrl+Space)" over "Pivote les textes sélectionnés à un angle précis". Co-Authored-By: Claude Opus 5.5 --- sources/ElementsCollection/elementpickerpopup.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sources/ElementsCollection/elementpickerpopup.cpp b/sources/ElementsCollection/elementpickerpopup.cpp index 2cfc1aaa4..5ebc14fd4 100644 --- a/sources/ElementsCollection/elementpickerpopup.cpp +++ b/sources/ElementsCollection/elementpickerpopup.cpp @@ -404,10 +404,16 @@ void ElementPickerPopup::setCommands(const QStringList &ids) button->setIcon(action->icon()); } const QKeySequence key = action->shortcut(); - button->setToolTip(key.isEmpty() - ? text - : QStringLiteral("%1 (%2)").arg( - text, key.toString(QKeySequence::NativeText))); + QString tip = key.isEmpty() + ? text + : QStringLiteral("%1 (%2)").arg( + text, key.toString(QKeySequence::NativeText)); + //The status tip says what the command does, which a short + //name such as "Orienter les textes" does not + if (!action->statusTip().isEmpty()) { + tip += QLatin1Char('\n') + action->statusTip(); + } + button->setToolTip(tip); button->setEnabled(action->isEnabled()); button->setFocusPolicy(Qt::NoFocus); connect(button, &QToolButton::clicked, this, [this, action]() {