Features
- Add Comment to the text selection context menu. Selecting text and choosing Comment
now opens an input dialog, then creates a highlight annotation with the comment embedded
as a single undoable operation — no need to first highlight and then right-click the
annotation to add a comment. - Add Copy Text to the highlight annotation context menu. Copies the exact highlighted
text to the clipboard by testing each character's centre against the annotation's quad
points, using the cached stext page so no extra parsing is needed. - Ability to open multiple files using file dialog to open in new tab, vsplit or hsplit.
DocumentViewno longer inheritsQOpenGLWidget— it is a plainQWidgetthat hosts
theGraphicsView; all GPU work goes through the view's ownQOpenGLWidgetviewport.- Touch events are now correctly re-applied to the new viewport after
applyBackend()
replaces it. - A global
QSurfaceFormat(depth 24, stencil 8) is set beforeQApplication
construction to ensure a well-formed OpenGL context on all platforms.
Lua API
- New dispatch event
OnShutdown- Dispatched when the application is shutting down
- Event callbacks now receive typed arguments instead of a raw
Lektrapointer for
events where more specific data is available:OnScreenChanged— callback receives aScreenInfotable with fields:
name,dpr,logical_dpi,physical_dpi,refresh_rate, and
geometry({x, y, w, h})OnTabChanged,OnTabRemoved— callback receives the tab index as an integer
- Lua stubs:
ScreenInfoclass added with full field annotations
Bug Fixes
- Save File menu action is now enabled only when the document has unsaved changes,
providing a clear visual signal of modified state. A newmodifiedChanged(bool)signal
onDocumentViewdrives the update so the menu reacts immediately on each edit. - File Properties menu action is now enabled for all open file types, not just PDF.
- Back / Forward history navigation actions are now enabled only when there is actually
somewhere to navigate:canGoBack()andcanGoForward()methods were added to
DocumentView, ahistoryChanged()signal is emitted fromaddToHistory,
GoBackHistory, andGoForwardHistory, and a dedicated
updateHistoryNavigationActions()keeps the menu items in sync on every history change
and on tab switch. - Invert Colour menu item checked state is now synced on tab switch. Previously
switching between tabs with different invert states left the checkbox stale; it is now
updated inupdateUiEnabledState. - Fix annotation comment edits (right-click annotation → Add Comment) not being tracked by
the undo stack. Comments are now pushed asAnnotCommentCommandentries, so they can be
undone/redone correctly and the modified indicator stays in sync. - Fix save being available after a save → undo → redo cycle. The undo stack correctly
returns to its clean index on redo, but MuPDF's internal mutation tracker still reported
unsaved changes because it sees the undo and redo as two separate edits.SaveFilenow
usesm_is_modified(driven by the undo stack's clean state) rather than
pdf_has_unsaved_changesto decide whether a save is needed. - Fix zoom glitch in multi-page document mode: interactive zoom (pinch/scroll) now uses an
O(1) GPU view-transform (QGraphicsView::scale) for each step, deferring the O(n)
repositionPages()call until the scroll-debounce timer settles. This eliminates the
jarring per-page resize flash that was visible during zoom. - Fix multi-page text selection breaking when scrolling: pages within the active selection
range are now protected from eviction byremoveUnusedPageItems, preventing gaps in the
rendered quads andpageAtScenePosfailures on the anchor page. - Fix fit mode not working properly for images/djvu files after rotating
- Fix pickers (command palette, outline, bookmarks, etc.) leaking key events and shortcuts
to the focusedDocumentViewwhile open. Pickers now grab the keyboard on launch and
install an application-level event filter to swallowQShortcutEvents, both of which
are released on dismiss or item acceptance. - Fix
InputDialogok and cancel buttons looking flat and weird. - Render highlight annotations spanning multiple lines correctly by splitting the annotation quad into separate quads
for each line. Previously, single rectangular quad spanning the multi-line highlight was rendered.