From e805eba32f773ae7319a0b2ad1a91ab4ba781434 Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Sun, 9 Feb 2025 01:31:36 -0500 Subject: [PATCH] Comments, consistency --- include/KeyboardShortcuts.h | 5 ++++- src/core/AutomationClip.cpp | 2 +- src/gui/clips/ClipView.cpp | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/KeyboardShortcuts.h b/include/KeyboardShortcuts.h index 94ab66ce128..57693ca5c29 100644 --- a/include/KeyboardShortcuts.h +++ b/include/KeyboardShortcuts.h @@ -54,7 +54,9 @@ constexpr const char* UI_ALT_KEY = "Alt"; #endif -constexpr const char* UI_LINK_KEY = +// UI hint for copying OR linking a UI component +// this MUST be consistent with KBD_COPY_MODIFIER +constexpr const char* UI_COPY_KEY = #ifdef LMMS_BUILD_APPLE UI_ALT_KEY; #else @@ -62,6 +64,7 @@ UI_CTRL_KEY; #endif // Shortcut for copying OR linking a UI component +// this MUST be consistent with UI_COPY_KEY constexpr Qt::KeyboardModifier KBD_COPY_MODIFIER = #ifdef LMMS_BUILD_APPLE Qt::AltModifier; diff --git a/src/core/AutomationClip.cpp b/src/core/AutomationClip.cpp index ee656dc6e08..ef57a60d50a 100644 --- a/src/core/AutomationClip.cpp +++ b/src/core/AutomationClip.cpp @@ -953,7 +953,7 @@ QString AutomationClip::name() const { return m_objects.front()->fullDisplayName(); } - return tr( "Drag a control while pressing <%1>" ).arg(UI_LINK_KEY); + return tr( "Drag a control while pressing <%1>" ).arg(UI_COPY_KEY); } diff --git a/src/gui/clips/ClipView.cpp b/src/gui/clips/ClipView.cpp index df86b8ed3c0..f9415ea747d 100644 --- a/src/gui/clips/ClipView.cpp +++ b/src/gui/clips/ClipView.cpp @@ -727,7 +727,7 @@ void ClipView::mousePressEvent( QMouseEvent * me ) QString hint = m_action == Action::Move || m_action == Action::MoveSelection ? tr( "Press <%1> and drag to make a copy." ) : tr( "Press <%1> for free resizing." ); - m_hint = TextFloat::displayMessage( tr( "Hint" ), UI_LINK_KEY, + m_hint = TextFloat::displayMessage( tr( "Hint" ), UI_COPY_KEY, embed::getIconPixmap( "hint" ), 0 ); } }