mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Image popup: Allow zooming using the Ctrl+plus and Ctrl+minus standard shortcuts. Fixes #1985021 [[Enhancement - Image viewer] Clicking the + and - keys to zoom](https://bugs.launchpad.net/calibre/+bug/1985021)
This commit is contained in:
parent
a8b1066276
commit
e7d4ab0575
@ -124,6 +124,14 @@ class ImageView(QDialog):
|
||||
self.current_url = current_url
|
||||
self.factor = 1.0
|
||||
self.geom_name = geom_name
|
||||
self.zoom_in_action = ac = QAction(self)
|
||||
ac.triggered.connect(self.zoom_in)
|
||||
ac.setShortcut(QKeySequence(QKeySequence.StandardKey.ZoomIn))
|
||||
self.addAction(ac)
|
||||
self.zoom_out_action = ac = QAction(self)
|
||||
ac.triggered.connect(self.zoom_out)
|
||||
ac.setShortcut(QKeySequence(QKeySequence.StandardKey.ZoomOut))
|
||||
self.addAction(ac)
|
||||
|
||||
self.scrollarea = sa = ScrollArea()
|
||||
sa.setAlignment(Qt.AlignmentFlag.AlignHCenter | Qt.AlignmentFlag.AlignVCenter)
|
||||
|
Loading…
x
Reference in New Issue
Block a user