|
|
@@ -352,7 +352,7 @@ void VMainWindow::initMarkdownMenu()
|
|
|
|
|
|
initRenderBackgroundMenu(markdownMenu);
|
|
|
|
|
|
- QAction *constrainImageAct = new QAction(tr("Constrain The Width of Images in Read Mode"), this);
|
|
|
+ QAction *constrainImageAct = new QAction(tr("Constrain The Width of Images"), this);
|
|
|
constrainImageAct->setToolTip(tr("Constrain the width of images to the window in read mode (re-open current tabs to make it work)"));
|
|
|
constrainImageAct->setCheckable(true);
|
|
|
connect(constrainImageAct, &QAction::triggered,
|
|
|
@@ -360,6 +360,14 @@ void VMainWindow::initMarkdownMenu()
|
|
|
markdownMenu->addAction(constrainImageAct);
|
|
|
constrainImageAct->setChecked(vconfig.getEnableImageConstraint());
|
|
|
|
|
|
+ QAction *imageCaptionAct = new QAction(tr("Enable Image Caption"), this);
|
|
|
+ imageCaptionAct->setToolTip(tr("Center the images and display the alt text as caption (re-open current tabs to make it work)"));
|
|
|
+ imageCaptionAct->setCheckable(true);
|
|
|
+ connect(imageCaptionAct, &QAction::triggered,
|
|
|
+ this, &VMainWindow::enableImageCaption);
|
|
|
+ markdownMenu->addAction(imageCaptionAct);
|
|
|
+ imageCaptionAct->setChecked(vconfig.getEnableImageCaption());
|
|
|
+
|
|
|
markdownMenu->addSeparator();
|
|
|
|
|
|
QAction *mermaidAct = new QAction(tr("&Mermaid Diagram"), this);
|
|
|
@@ -1316,6 +1324,11 @@ void VMainWindow::enableImageConstraint(bool p_checked)
|
|
|
vnote->updateTemplate();
|
|
|
}
|
|
|
|
|
|
+void VMainWindow::enableImageCaption(bool p_checked)
|
|
|
+{
|
|
|
+ vconfig.setEnableImageCaption(p_checked);
|
|
|
+}
|
|
|
+
|
|
|
void VMainWindow::shortcutHelp()
|
|
|
{
|
|
|
QString locale = VUtils::getLocale();
|