Use the platform native fullscreen key for the standalone cover browser

This commit is contained in:
Kovid Goyal 2021-04-19 08:21:20 +05:30
parent 961607c554
commit 4fe2fdc5c1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 4 additions and 5 deletions

View File

@ -253,8 +253,7 @@ class CBDialog(QDialog):
self.resize(w, h)
self.action_fs_toggle = a = QAction(self)
self.addAction(a)
a.setShortcuts([QKeySequence('F11', QKeySequence.SequenceFormat.PortableText),
QKeySequence('Ctrl+Shift+F', QKeySequence.SequenceFormat.PortableText)])
a.setShortcuts([QKeySequence(QKeySequence.StandardKey.FullScreen)])
a.triggered.connect(self.toggle_fullscreen)
self.action_esc_fs = a = QAction(self)
a.triggered.connect(self.show_normal)

View File

@ -550,8 +550,8 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
keys = [QKeySequence('F11', QKeySequence.SequenceFormat.PortableText), QKeySequence(
'Ctrl+Shift+F', QKeySequence.SequenceFormat.PortableText)]
keys = [unicode_type(x.toString(QKeySequence.SequenceFormat.NativeText)) for x in keys]
self.fs_help_msg.setText(unicode_type(self.fs_help_msg.text())%(
_(' or ').join(keys)))
self.fs_help_msg.setText(self.fs_help_msg.text()%(
QKeySequence(QKeySequence.StandardKey.FullScreen).toString(QKeySequence.SequenceFormat.NativeText)))
self.size_calculated.connect(self.update_cg_cache_size, type=Qt.ConnectionType.QueuedConnection)
self.tabWidget.currentChanged.connect(self.tab_changed)

View File

@ -1244,7 +1244,7 @@ them to all have the same width and height</string>
<string notr="true">margin-left: 1.5em</string>
</property>
<property name="text">
<string>You can press the %s keys to toggle full screen mode.</string>
<string>You can press the %s key to toggle full screen mode.</string>
</property>
<property name="wordWrap">
<bool>true</bool>