Skip to content

Commit

Permalink
Change resize behaviour of main splitter (#1388)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbo authored Feb 28, 2023
2 parents eb39f5e + 21db406 commit 9fdfe76
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions novelwriter/guimain.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def __init__(self):
self.splitDocs.setOpaqueResize(False)
self.splitDocs.setHandleWidth(hWd)

# Splitter : Project Tree / Main Tabs
# Splitter : Project Tree / Document Area
self.splitMain = QSplitter(Qt.Horizontal)
self.splitMain.setContentsMargins(0, 0, 0, 0)
self.splitMain.addWidget(self.treePane)
Expand All @@ -184,7 +184,7 @@ def __init__(self):
self.idxViewDoc = self.splitView.indexOf(self.docViewer)
self.idxViewMeta = self.splitView.indexOf(self.viewMeta)

# Indices of Tab Widgets
# Indices of Stack Widgets
self.idxEditorView = self.mainStack.indexOf(self.splitMain)
self.idxOutlineView = self.mainStack.indexOf(self.outlineView)
self.idxProjView = self.projStack.indexOf(self.projView)
Expand All @@ -198,6 +198,9 @@ def __init__(self):
self.splitView.setCollapsible(self.idxViewDoc, False)
self.splitView.setCollapsible(self.idxViewMeta, False)

self.splitMain.setStretchFactor(self.idxTree, 0)
self.splitMain.setStretchFactor(self.idxMain, 1)

# Editor / Viewer Default State
self.splitView.setVisible(False)
self.docEditor.closeSearch()
Expand Down

0 comments on commit 9fdfe76

Please sign in to comment.