mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-18 10:54:34 +12:00
Fixing fullscreen button
This commit is contained in:
parent
21de78c27b
commit
e230e2b6cc
|
@ -226,10 +226,6 @@ class editorWidget(QWidget, Ui_editorWidget_ui):
|
|||
self.currentDict = dct
|
||||
self.dictChanged.emit(dct)
|
||||
|
||||
def showFullscreen(self, index):
|
||||
|
||||
self._fullScreen = fullScreenEditor(index)
|
||||
|
||||
def keyPressEvent(self, event):
|
||||
if event.key() in [Qt.Key_Escape, Qt.Key_F11] and self._fullscreen:
|
||||
mainWindow().show()
|
||||
|
|
|
@ -46,14 +46,25 @@ class mainEditor(QWidget, Ui_mainEditor):
|
|||
index = self.currentEditor().currentIndex
|
||||
view = self.currentEditor().folderView
|
||||
self.updateFolderViewButtons(view)
|
||||
if index.isValid():
|
||||
hidden = not index.internalPointer().isFolder()
|
||||
else:
|
||||
hidden = False
|
||||
else:
|
||||
index = QModelIndex()
|
||||
hidden = False
|
||||
|
||||
self._updating = True
|
||||
self.mw.treeRedacOutline.setCurrentIndex(index)
|
||||
self._updating = False
|
||||
|
||||
self.updateStats()
|
||||
|
||||
self.btnRedacFolderText.setHidden(hidden)
|
||||
self.btnRedacFolderCork.setHidden(hidden)
|
||||
self.btnRedacFolderOutline.setHidden(hidden)
|
||||
self.sldCorkSizeFactor.setHidden(hidden)
|
||||
self.btnRedacFullscreen.setVisible(hidden)
|
||||
|
||||
def closeTab(self, index):
|
||||
#FIXME: submit data if textedit?
|
||||
|
@ -73,20 +84,9 @@ class mainEditor(QWidget, Ui_mainEditor):
|
|||
if len(self.mw.treeRedacOutline.selectionModel().
|
||||
selection().indexes()) == 0:
|
||||
hidden = False
|
||||
idx = QModelIndex()
|
||||
else:
|
||||
idx = self.mw.treeRedacOutline.currentIndex()
|
||||
if idx.isValid():
|
||||
hidden = not idx.internalPointer().isFolder()
|
||||
else:
|
||||
hidden = False
|
||||
|
||||
self.btnRedacFolderText.setHidden(hidden)
|
||||
self.btnRedacFolderCork.setHidden(hidden)
|
||||
self.btnRedacFolderOutline.setHidden(hidden)
|
||||
self.sldCorkSizeFactor.setHidden(hidden)
|
||||
self.btnRedacFullscreen.setVisible(hidden)
|
||||
|
||||
self.setCurrentModelIndex(idx)
|
||||
|
||||
def openIndexes(self, indexes, newTab=False):
|
||||
|
@ -199,9 +199,8 @@ class mainEditor(QWidget, Ui_mainEditor):
|
|||
w.corkView.outlineView.viewport().update()
|
||||
|
||||
def showFullScreen(self):
|
||||
pass
|
||||
#FIXME
|
||||
#self.redacEditor.showFullscreen(self.treeRedacOutline.currentIndex()
|
||||
if self.currentEditor():
|
||||
self._fullScreen = fullScreenEditor(self.currentEditor().currentIndex)
|
||||
|
||||
###############################################################################
|
||||
# DICT AND STUFF LIKE THAT
|
||||
|
|
Loading…
Reference in a new issue