Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "Start Column" to pdfContext/Grid #3974

Merged
merged 3 commits into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/pdfviewer/PDFDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,8 @@ void PDFWidget::contextMenuEvent(QContextMenuEvent *event)
doZoom(event->pos(), 1);
else if (action == ctxZoomOutAction)
doZoom(event->pos(), -1);

else if (action == pdfDoc->actionSetPageOffsetMenu)
setPageOffsetClick(event->pos());
}

bool PDFWidget::event(QEvent *event)
Expand Down Expand Up @@ -3114,6 +3115,8 @@ void PDFDocument::setupMenus(bool embedded)
actionSinglePageStep=configManager->newManagedAction(menuroot,menuGrid, "singlePageStep", tr("Single Page Step"), pdfWidget, SLOT(setSinglePageStep(bool)), QList<QKeySequence>());
menuGridContext->addAction(actionSinglePageStep);
menuGridContext->addAction(actionContinuous);
menuGridContext->addSeparator();
actionSetPageOffsetMenu=configManager->newManagedAction(menuroot,menuGridContext, "setPageOffset", tr("Start Column"), this, "", QList<QKeySequence>());
menuWindow->addAction(menuShow->menuAction());
#if (QT_VERSION > 0x050a00) && (defined(Q_OS_MAC))
actionCloseElement=configManager->newManagedAction(menuroot,menuWindow, "closeElement", tr("&Close something"), this, SLOT(closeElement()), QList<QKeySequence>()); // osx work around
Expand Down
1 change: 1 addition & 0 deletions src/pdfviewer/PDFDocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ private slots:
QMenu *menuGrid = nullptr;
QMenu *menuGridContext = nullptr;
QMenu *menuShow = nullptr;
QAction *actionSetPageOffsetMenu;
private:
QMenu *menuEdit_2;

Expand Down
1 change: 1 addition & 0 deletions utilities/manual/source/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- repair user macro trigger (?highlight-as:...), still not usable for math env detection
- add new user macro trigger (?inEnv:...)
- add Grid menu to windowed and embedded pdf-viewer's context menu [#3942](https://github.com/texstudio-org/texstudio/pull/3942)
- add "Start Column" (sets column of first page, same as Shift+Click) to Grid menu of pdf-viewer's context menu [#3974](https://github.com/texstudio-org/texstudio/pull/3974)
- fix pdf-viewer's scrollbar with Fit to Width/Window and changing Continuous mode [#3928](https://github.com/texstudio-org/texstudio/pull/3928)
- fix pdf-viewer's Custom Grid dialog not preset with current Grid settings in Continuous mode [#3929](https://github.com/texstudio-org/texstudio/pull/3929)
- fix pfd-viewer's page display in non continuous mode [#3952](https://github.com/texstudio-org/texstudio/pull/3952)
Expand Down