mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1159610 ("Book Details Window" keyboard navigation doesn't work on a Mac)
This commit is contained in:
parent
3eacc9cadb
commit
e0246c5357
@ -5,7 +5,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
from PyQt4.Qt import (QCoreApplication, SIGNAL, QModelIndex, QTimer, Qt,
|
||||
QDialog, QPixmap, QIcon, QSize, QPalette)
|
||||
QDialog, QPixmap, QIcon, QSize, QPalette, QShortcut, QKeySequence)
|
||||
|
||||
from calibre.gui2.dialogs.book_info_ui import Ui_BookInfo
|
||||
from calibre.gui2 import dynamic
|
||||
@ -43,6 +43,14 @@ class BookInfo(QDialog, Ui_BookInfo):
|
||||
self.fit_cover.stateChanged.connect(self.toggle_cover_fit)
|
||||
self.cover.resizeEvent = self.cover_view_resized
|
||||
self.cover.cover_changed.connect(self.cover_changed)
|
||||
self.ns = QShortcut(QKeySequence('Alt+Right'), self)
|
||||
self.ns.activated.connect(self.next)
|
||||
self.ps = QShortcut(QKeySequence('Alt+Left'), self)
|
||||
self.ps.activated.connect(self.previous)
|
||||
self.next_button.setToolTip(_('Next [%s]')%
|
||||
unicode(self.ns.key().toString(QKeySequence.NativeText)))
|
||||
self.previous_button.setToolTip(_('Previous [%s]')%
|
||||
unicode(self.ps.key().toString(QKeySequence.NativeText)))
|
||||
|
||||
desktop = QCoreApplication.instance().desktop()
|
||||
screen_height = desktop.availableGeometry().height() - 100
|
||||
|
Loading…
x
Reference in New Issue
Block a user