Fix #2110206 [[Enhancement] Add Fit image action to right click menu of the image viewer](https://bugs.launchpad.net/calibre/+bug/2110206)

This commit is contained in:
Kovid Goyal 2025-05-08 19:55:56 +05:30
parent e370c555ba
commit acb007a297
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -224,6 +224,11 @@ class ImageView(QDialog):
m.addAction(self.zoom_out_action) m.addAction(self.zoom_out_action)
m.addAction(self.copy_action) m.addAction(self.copy_action)
m.addAction(self.rotate_action) m.addAction(self.rotate_action)
ac = QAction(self.fit_image.text())
ac.setCheckable(True)
ac.setChecked(self.fit_image.isChecked())
ac.toggled.connect(self.toggle_fit)
m.addAction(ac)
m.exec(self.mapToGlobal(pos)) m.exec(self.mapToGlobal(pos))
def set_to_viewport_size(self): def set_to_viewport_size(self):