Fullscreened widget closure saves settings
This commit is contained in:
1
TODO
1
TODO
@@ -64,7 +64,6 @@ TODO
|
|||||||
✓ Define every widget in code
|
✓ Define every widget in code
|
||||||
Bugs:
|
Bugs:
|
||||||
If there are files open and the database is deleted, TypeErrors result
|
If there are files open and the database is deleted, TypeErrors result
|
||||||
Closing a fullscreened contentView does not save settings
|
|
||||||
|
|
||||||
Secondary:
|
Secondary:
|
||||||
Annotations
|
Annotations
|
||||||
|
@@ -106,7 +106,8 @@ class Settings:
|
|||||||
self.settings.setValue('windowSize', self.parent.size())
|
self.settings.setValue('windowSize', self.parent.size())
|
||||||
self.settings.setValue('windowPosition', self.parent.pos())
|
self.settings.setValue('windowPosition', self.parent.pos())
|
||||||
self.settings.setValue('currentView', self.parent.stackedWidget.currentIndex())
|
self.settings.setValue('currentView', self.parent.stackedWidget.currentIndex())
|
||||||
self.settings.setValue('listViewBackground', self.parent.settings['listview_background'])
|
self.settings.setValue(
|
||||||
|
'listViewBackground', self.parent.settings['listview_background'])
|
||||||
|
|
||||||
table_headers = []
|
table_headers = []
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
|
11
widgets.py
11
widgets.py
@@ -207,6 +207,10 @@ class Tab(QtWidgets.QWidget):
|
|||||||
self.exit_fs.setContext(QtCore.Qt.ApplicationShortcut)
|
self.exit_fs.setContext(QtCore.Qt.ApplicationShortcut)
|
||||||
self.exit_fs.activated.connect(self.exit_fullscreen)
|
self.exit_fs.activated.connect(self.exit_fullscreen)
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
# See why Ctrl + Q stop working on a non fullscreened contentView
|
||||||
|
# widget in case the following is in code
|
||||||
|
|
||||||
# self.exit_all = QtWidgets.QShortcut(
|
# self.exit_all = QtWidgets.QShortcut(
|
||||||
# QtGui.QKeySequence('Ctrl+Q'), self.contentView)
|
# QtGui.QKeySequence('Ctrl+Q'), self.contentView)
|
||||||
# self.exit_all.activated.connect(self.sneaky_exit)
|
# self.exit_all.activated.connect(self.sneaky_exit)
|
||||||
@@ -466,6 +470,10 @@ class PliantQGraphicsView(QtWidgets.QGraphicsView):
|
|||||||
self.setCursor(QtCore.Qt.ArrowCursor)
|
self.setCursor(QtCore.Qt.ArrowCursor)
|
||||||
self.parent.mouse_hide_timer.start(3000)
|
self.parent.mouse_hide_timer.start(3000)
|
||||||
|
|
||||||
|
def closeEvent(self, *args):
|
||||||
|
# In case the program is closed when a contentView is fullscreened
|
||||||
|
self.main_window.closeEvent()
|
||||||
|
|
||||||
|
|
||||||
class PliantQTextBrowser(QtWidgets.QTextBrowser):
|
class PliantQTextBrowser(QtWidgets.QTextBrowser):
|
||||||
def __init__(self, main_window, parent=None):
|
def __init__(self, main_window, parent=None):
|
||||||
@@ -519,6 +527,9 @@ class PliantQTextBrowser(QtWidgets.QTextBrowser):
|
|||||||
else:
|
else:
|
||||||
self.parent.metadata['position']['last_visible_text'] = visible_text
|
self.parent.metadata['position']['last_visible_text'] = visible_text
|
||||||
|
|
||||||
|
def closeEvent(self, *args):
|
||||||
|
self.main_window.closeEvent()
|
||||||
|
|
||||||
# def mouseMoveEvent(self, event):
|
# def mouseMoveEvent(self, event):
|
||||||
# TODO
|
# TODO
|
||||||
# This does not work as expected
|
# This does not work as expected
|
||||||
|
Reference in New Issue
Block a user