Improve novel extra data column

This commit is contained in:
Veronica Berglyd Olsen
2025-03-23 17:01:48 +01:00
parent 95d8e3ac98
commit 4d9c87b019
3 changed files with 16 additions and 18 deletions
+5 -7
View File
@@ -45,8 +45,8 @@ from novelwriter.extensions.modified import NIconToolButton, NTreeView
from novelwriter.extensions.novelselector import NovelSelector
from novelwriter.gui.theme import STYLES_MIN_TOOLBUTTON
from novelwriter.types import (
QtHeaderFixed, QtHeaderStretch, QtHeaderToContents, QtScrollAlwaysOff,
QtScrollAsNeeded, QtSizeExpanding
QtHeaderStretch, QtHeaderToContents, QtScrollAlwaysOff, QtScrollAsNeeded,
QtSizeExpanding
)
logger = logging.getLogger(__name__)
@@ -481,12 +481,10 @@ class GuiNovelTree(NTreeView):
header.setMinimumSectionSize(SHARED.theme.baseIconHeight + 6)
header.setSectionResizeMode(0, QtHeaderStretch)
header.setSectionResizeMode(1, QtHeaderToContents)
if model.columns == 3:
header.setSectionResizeMode(2, QtHeaderToContents)
elif model.columns == 4:
header.setSectionResizeMode(2, QtHeaderFixed)
header.setSectionResizeMode(2, QtHeaderToContents)
if model.columns == 4:
header.setSectionResizeMode(3, QtHeaderToContents)
header.resizeSection(2, int(self._lastColSize * vp.width()))
header.setMaximumSectionSize(int(self._lastColSize * vp.width()))
return
##