From 14000924e2969400564d0d40f442aff534b823e6 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 11 Apr 2017 13:11:59 +0300 Subject: [PATCH] Improve tooltipe of operation tools. Should help to understand how to select multiple objects. --HG-- branch : release --- src/app/valentina/mainwindow.cpp | 44 ++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 786f67cfb..2964eb56e 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -1071,8 +1071,10 @@ void MainWindow::ClosedDialogUnionDetails(int result) void MainWindow::ToolGroup(bool checked) { ToolSelectGroupObjects(); - SetToolButton(checked, Tool::Group, ":/cursor/group_plus_cursor.png", - tr("Select one or more objects, Enter - finish creation"), + const QString tooltip = tr("Select one or more objects, hold %1 - for multiple selection, " + "Enter - finish creation") + .arg(QCoreApplication::translate("QShortcut", "Ctrl")); + SetToolButton(checked, Tool::Group, ":/cursor/group_plus_cursor.png", tooltip, &MainWindow::ClosedDialogGroup); } @@ -1080,9 +1082,10 @@ void MainWindow::ToolGroup(bool checked) void MainWindow::ToolRotation(bool checked) { ToolSelectOperationObjects(); - SetToolButtonWithApply(checked, Tool::Rotation, - ":/cursor/rotation_cursor.png", - tr("Select one or more objects, Enter - confirm selection"), + const QString tooltip = tr("Select one or more objects, hold %1 - for multiple selection, " + "Enter - confirm selection") + .arg(QCoreApplication::translate("QShortcut", "Ctrl")); + SetToolButtonWithApply(checked, Tool::Rotation, ":/cursor/rotation_cursor.png", tooltip, &MainWindow::ClosedDrawDialogWithApply, &MainWindow::ApplyDrawDialog); } @@ -1091,21 +1094,23 @@ void MainWindow::ToolRotation(bool checked) void MainWindow::ToolFlippingByLine(bool checked) { ToolSelectOperationObjects(); - SetToolButtonWithApply(checked, Tool::FlippingByLine, - ":/cursor/flipping_line_cursor.png", - tr("Select one or more objects, Enter - confirm selection"), - &MainWindow::ClosedDrawDialogWithApply, - &MainWindow::ApplyDrawDialog); + const QString tooltip = tr("Select one or more objects, hold %1 - for multiple selection, " + "Enter - confirm selection") + .arg(QCoreApplication::translate("QShortcut", "Ctrl")); + SetToolButtonWithApply(checked, Tool::FlippingByLine, ":/cursor/flipping_line_cursor.png", + tooltip, &MainWindow::ClosedDrawDialogWithApply, + &MainWindow::ApplyDrawDialog); } //--------------------------------------------------------------------------------------------------------------------- void MainWindow::ToolFlippingByAxis(bool checked) { ToolSelectOperationObjects(); - SetToolButtonWithApply(checked, Tool::FlippingByAxis, - ":/cursor/flipping_axis_cursor.png", - tr("Select one or more objects, Enter - confirm selection"), - &MainWindow::ClosedDrawDialogWithApply, + const QString tooltip = tr("Select one or more objects, hold %1 - for multiple selection, " + "Enter - confirm selection") + .arg(QCoreApplication::translate("QShortcut", "Ctrl")); + SetToolButtonWithApply(checked, Tool::FlippingByAxis, ":/cursor/flipping_axis_cursor.png", + tooltip, &MainWindow::ClosedDrawDialogWithApply, &MainWindow::ApplyDrawDialog); } @@ -1113,11 +1118,12 @@ void MainWindow::ToolFlippingByAxis(bool checked) void MainWindow::ToolMove(bool checked) { ToolSelectOperationObjects(); - SetToolButtonWithApply(checked, Tool::Move, - ":/cursor/move_cursor.png", - tr("Select one or more objects, Enter - confirm selection"), - &MainWindow::ClosedDrawDialogWithApply, - &MainWindow::ApplyDrawDialog); + const QString tooltip = tr("Select one or more objects, hold %1 - for multiple selection, " + "Enter - confirm selection") + .arg(QCoreApplication::translate("QShortcut", "Ctrl")); + SetToolButtonWithApply(checked, Tool::Move, ":/cursor/move_cursor.png", tooltip, + &MainWindow::ClosedDrawDialogWithApply, + &MainWindow::ApplyDrawDialog); } //---------------------------------------------------------------------------------------------------------------------