Capture tool button looks at copy on double-click config setting and … (#2806)

* Capture tool button looks at copy on double-click config setting and sets button description accordingly.

* Ran clang-format on capturetoolbutton.cpp for code formatting.
This commit is contained in:
dsticks
2022-07-18 17:30:33 -06:00
committed by GitHub
parent 48d5eb451f
commit 57c8e8d893

View File

@@ -62,7 +62,8 @@ void CaptureToolButton::initButton()
QString tooltip = m_tool->description();
QString shortcut =
ConfigHandler().shortcut(QVariant::fromValue(m_buttonType).toString());
if (m_buttonType == CaptureTool::TYPE_COPY) {
if (m_buttonType == CaptureTool::TYPE_COPY &&
ConfigHandler().copyOnDoubleClick()) {
tooltip += QStringLiteral(" (%1Left Double-Click)")
.arg(shortcut.isEmpty() ? QString() : shortcut + " or ");
} else if (!shortcut.isEmpty()) {