diff --git a/src/main/python/plotlyst/core/domain.py b/src/main/python/plotlyst/core/domain.py index acac63db9..51d36b544 100644 --- a/src/main/python/plotlyst/core/domain.py +++ b/src/main/python/plotlyst/core/domain.py @@ -2184,8 +2184,8 @@ class WorldConceit: type: WorldConceitType id: uuid.UUID = field(default_factory=uuid.uuid4) text: str = field(default='', metadata=config(exclude=exclude_if_empty)) - icon: str = '' - icon_color: str = 'black' + icon: str = field(default='', metadata=config(exclude=exclude_if_empty)) + icon_color: str = field(default='', metadata=config(exclude=exclude_if_empty)) children: List['WorldConceit'] = field(default_factory=list, metadata=config(exclude=exclude_if_empty)) @overrides diff --git a/src/main/python/plotlyst/view/widget/world/conceit.py b/src/main/python/plotlyst/view/widget/world/conceit.py index 21a377982..2f4cd027e 100644 --- a/src/main/python/plotlyst/view/widget/world/conceit.py +++ b/src/main/python/plotlyst/view/widget/world/conceit.py @@ -45,7 +45,8 @@ def __init__(self, conceit: WorldConceit, parent=None): self._removalEnabled = True icon = self.conceit.icon if self.conceit.icon else self.conceit.type.icon() - self._title.setIcon(IconRegistry.from_name(icon, '#510442')) + color = self.conceit.icon_color if self.conceit.icon_color else '#510442' + self._title.setIcon(IconRegistry.from_name(icon, color)) self._title.setText(self.conceit.name) self._title.lineEdit.textEdited.connect(self._titleEdited) self._title.iconChanged.connect(self._iconChanged) @@ -70,6 +71,9 @@ def _textChanged(self): def _iconChanged(self, icon: str, color: str): self.conceit.icon = icon + if color == 'black' or color == '#000000': + color = '#510442' + self._title.setIcon(IconRegistry.from_name(icon, color)) self.conceit.icon_color = color self.iconChanged.emit() diff --git a/src/main/python/plotlyst/view/widget/world/editor.py b/src/main/python/plotlyst/view/widget/world/editor.py index 1187adf38..a3dbd3940 100644 --- a/src/main/python/plotlyst/view/widget/world/editor.py +++ b/src/main/python/plotlyst/view/widget/world/editor.py @@ -685,7 +685,7 @@ def __init__(self, novel: Novel, element: WorldBuildingEntityElement, parent=Non self._splitter.setChildrenCollapsible(False) self._splitter.setHandleWidth(10) self._splitter.setProperty('framed', True) - self._splitter.setSizes([150, 500]) + self._splitter.setSizes([100, 500]) self._wdgEditor.layout().addWidget(self._splitter) self._wdgTree = ConceitsTreeView(novel)