changed setting name and reverted non-issue fix

This commit is contained in:
Dasith Gunawardhana 2017-11-14 01:41:15 -05:00
parent 4419e59d46
commit ea70a0dea1
3 changed files with 11 additions and 13 deletions

View File

@ -259,11 +259,11 @@ 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: content.windowed_fullscreen:
type: Bool type: Bool
default: true default: false
desc: >- desc: >-
Allow fullscreen to cover the entire desktop. Limit fullscreen to the browser window (does not expand to fill the screen).
content.developer_extras: content.developer_extras:
type: Bool type: Bool

View File

@ -491,14 +491,12 @@ class MainWindow(QWidget):
@pyqtSlot(bool) @pyqtSlot(bool)
def _on_fullscreen_requested(self, on): def _on_fullscreen_requested(self, on):
if on: if not config.val.content.windowed_fullscreen:
self.window_state_before_fullscreen = self.windowState() if on:
self.config_state_before_fullscreen = config.val.content.desktop_fullscreen self.state_before_fullscreen = self.windowState()
if config.val.content.desktop_fullscreen:
self.showFullScreen() self.showFullScreen()
elif self.isFullScreen(): elif self.isFullScreen():
if config.val.content.desktop_fullscreen or self.config_state_before_fullscreen: self.setWindowState(self.state_before_fullscreen)
self.setWindowState(self.window_state_before_fullscreen)
log.misc.debug('on: {}, state before fullscreen: {}'.format( log.misc.debug('on: {}, state before fullscreen: {}'.format(
on, debug.qflags_key(Qt, self.state_before_fullscreen))) on, debug.qflags_key(Qt, self.state_before_fullscreen)))

View File

@ -300,10 +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())
if config.val.content.desktop_fullscreen: if config.val.content.windowed_fullscreen:
geom = QApplication.desktop().screenGeometry(self)
else:
geom = self.parentWidget().geometry() geom = self.parentWidget().geometry()
else:
geom = QApplication.desktop().screenGeometry(self)
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):