added option to limit fullscreen to window only
This commit is contained in:
parent
408ceefad1
commit
36c8ca9790
@ -259,6 +259,12 @@ content.default_encoding:
|
|||||||
The encoding must be a string describing an encoding such as _utf-8_,
|
The encoding must be a string describing an encoding such as _utf-8_,
|
||||||
_iso-8859-1_, etc.
|
_iso-8859-1_, etc.
|
||||||
|
|
||||||
|
content.desktop_fullscreen:
|
||||||
|
type: Bool
|
||||||
|
default: true
|
||||||
|
desc: >-
|
||||||
|
Allow fullscreen to cover the entire desktop.
|
||||||
|
|
||||||
content.developer_extras:
|
content.developer_extras:
|
||||||
type: Bool
|
type: Bool
|
||||||
default: false
|
default: false
|
||||||
|
@ -493,7 +493,8 @@ class MainWindow(QWidget):
|
|||||||
def _on_fullscreen_requested(self, on):
|
def _on_fullscreen_requested(self, on):
|
||||||
if on:
|
if on:
|
||||||
self.state_before_fullscreen = self.windowState()
|
self.state_before_fullscreen = self.windowState()
|
||||||
self.showFullScreen()
|
if config.val.content.desktop_fullscreen:
|
||||||
|
self.showFullScreen()
|
||||||
elif self.isFullScreen():
|
elif self.isFullScreen():
|
||||||
self.setWindowState(self.state_before_fullscreen)
|
self.setWindowState(self.state_before_fullscreen)
|
||||||
log.misc.debug('on: {}, state before fullscreen: {}'.format(
|
log.misc.debug('on: {}, state before fullscreen: {}'.format(
|
||||||
|
@ -300,7 +300,10 @@ class FullscreenNotification(QLabel):
|
|||||||
self.setText("Page is now fullscreen.")
|
self.setText("Page is now fullscreen.")
|
||||||
|
|
||||||
self.resize(self.sizeHint())
|
self.resize(self.sizeHint())
|
||||||
geom = QApplication.desktop().screenGeometry(self)
|
if config.val.content.desktop_fullscreen:
|
||||||
|
geom = QApplication.desktop().screenGeometry(self)
|
||||||
|
else:
|
||||||
|
geom = self.parentWidget().geometry()
|
||||||
self.move((geom.width() - self.sizeHint().width()) / 2, 30)
|
self.move((geom.width() - self.sizeHint().width()) / 2, 30)
|
||||||
|
|
||||||
def set_timeout(self, timeout):
|
def set_timeout(self, timeout):
|
||||||
|
Loading…
Reference in New Issue
Block a user