feat: add "Keep transformation" to menu
This could be helpful when viewing a gallery with similar size, which need to apply same transformation to the view. E.g. When viewing a batch of pixel image sprite assets, the view might need to be zoomed to clearly view the detail of the image. Other use-case can be seen at the linked issue below. https://github.com/BLumia/pineapple-pictures/issues/87 https://github.com/BLumia/pineapple-pictures/issues/89
This commit is contained in:
parent
27be83184e
commit
6e5bde68d8
|
@ -41,6 +41,9 @@ AboutDialog::AboutDialog(QWidget *parent)
|
||||||
QStringLiteral("<li><b>%1</b>:<br/>%2</li>")
|
QStringLiteral("<li><b>%1</b>:<br/>%2</li>")
|
||||||
.arg(QCoreApplication::translate("MainWindow", "Protected mode"))
|
.arg(QCoreApplication::translate("MainWindow", "Protected mode"))
|
||||||
.arg(tr("Avoid close window accidentally. (eg. by double clicking the window)")),
|
.arg(tr("Avoid close window accidentally. (eg. by double clicking the window)")),
|
||||||
|
QStringLiteral("<li><b>%1</b>:<br/>%2</li>")
|
||||||
|
.arg(QCoreApplication::translate("MainWindow", "Keep transformation"))
|
||||||
|
.arg(tr("Avoid resetting the zoom/rotation/flip state that was applied to the image view when switching between images.")),
|
||||||
QStringLiteral("</ul>")
|
QStringLiteral("</ul>")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ void ActionManager::retranslateUi(MainWindow *mainWindow)
|
||||||
actionPaste->setText(QCoreApplication::translate("MainWindow", "&Paste", nullptr));
|
actionPaste->setText(QCoreApplication::translate("MainWindow", "&Paste", nullptr));
|
||||||
actionToggleStayOnTop->setText(QCoreApplication::translate("MainWindow", "Stay on top", nullptr));
|
actionToggleStayOnTop->setText(QCoreApplication::translate("MainWindow", "Stay on top", nullptr));
|
||||||
actionToggleProtectMode->setText(QCoreApplication::translate("MainWindow", "Protected mode", nullptr));
|
actionToggleProtectMode->setText(QCoreApplication::translate("MainWindow", "Protected mode", nullptr));
|
||||||
actionToggleAvoidResetTransform->setText("Avoid reset transform"); // TODO: what should it called?
|
actionToggleAvoidResetTransform->setText(QCoreApplication::translate("MainWindow", "Keep transformation", "The 'transformation' means the flip/rotation status that currently applied to the image"));
|
||||||
actionSettings->setText(QCoreApplication::translate("MainWindow", "Configure...", nullptr));
|
actionSettings->setText(QCoreApplication::translate("MainWindow", "Configure...", nullptr));
|
||||||
actionHelp->setText(QCoreApplication::translate("MainWindow", "Help", nullptr));
|
actionHelp->setText(QCoreApplication::translate("MainWindow", "Help", nullptr));
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
|
@ -485,9 +485,7 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
menu->addAction(stayOnTopMode);
|
menu->addAction(stayOnTopMode);
|
||||||
menu->addAction(protectedMode);
|
menu->addAction(protectedMode);
|
||||||
#if 0
|
|
||||||
menu->addAction(avoidResetTransform);
|
menu->addAction(avoidResetTransform);
|
||||||
#endif // 0
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
menu->addAction(toggleSettings);
|
menu->addAction(toggleSettings);
|
||||||
menu->addAction(helpAction);
|
menu->addAction(helpAction);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user