Skip to content

Commit

Permalink
Track fantasy conceits
Browse files Browse the repository at this point in the history
  • Loading branch information
zkovari committed Oct 9, 2024
1 parent fc11315 commit 27766ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/python/plotlyst/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ def is_dev(self) -> bool:
def is_prod(self) -> bool:
return self._mode == AppMode.PROD

def is_plus(self) -> bool:
return True

def test_env(self) -> bool:
if os.getenv('PLOTLYST_TEST_ENV'):
return True
Expand Down
11 changes: 10 additions & 1 deletion src/main/python/plotlyst/view/widget/world/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
grid, flow, spacer, line, incr_icon, gc, translucent, incr_font
from qthandy.filter import OpacityEventFilter, VisibilityToggleEventFilter, DisabledClickEventFilter, DragEventFilter, \
DropEventFilter
from qtmenu import MenuWidget
from qtmenu import MenuWidget, ActionTooltipDisplayMode
from qttextedit.ops import Heading2Operation, Heading3Operation, InsertListOperation, InsertNumberedListOperation, \
InsertDividerOperation

Expand Down Expand Up @@ -958,6 +958,15 @@ def __init__(self, parent=None):
self.addAction(action('Timeline', IconRegistry.from_name('mdi.timeline'),
slot=lambda: self.newBlockSelected.emit(WorldBuildingEntityElementType.Timeline)))

if app_env.is_plus():
otherMenu = MenuWidget()
otherMenu.setTooltipDisplayMode(ActionTooltipDisplayMode.DISPLAY_UNDER)
tooltip = "Track fantasy elements that deviate from our world, introducing a sense of wonder into the story"
otherMenu.addAction(action('Fantasy conceits', IconRegistry.from_name('ei.magic'), tooltip=tooltip))
otherMenu.setTitle('Other')
self.addSeparator()
self.addMenu(otherMenu)


class SideBlockAdditionMenu(MenuWidget):
newSideBlockSelected = pyqtSignal(WorldBuildingEntityElementType)
Expand Down

0 comments on commit 27766ba

Please sign in to comment.