Update the status shape feature (#1819)
This commit is contained in:
+410
-359
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -36,7 +36,7 @@ from PyQt5.QtWidgets import (
|
||||
|
||||
from novelwriter import CONFIG, SHARED
|
||||
from novelwriter.common import simplified
|
||||
from novelwriter.constants import nwLabels
|
||||
from novelwriter.constants import nwLabels, trConst
|
||||
from novelwriter.core.status import NWStatus, StatusEntry
|
||||
from novelwriter.enum import nwStatusShape
|
||||
from novelwriter.extensions.configlayout import NColourLabel, NFixedPage, NScrollableForm
|
||||
@@ -399,7 +399,7 @@ class _StatusPage(NFixedPage):
|
||||
def buildMenu(menu: QMenu, items: dict[nwStatusShape, str]) -> None:
|
||||
for shape, label in items.items():
|
||||
icon = NWStatus.createIcon(self._iPx, iColor, shape)
|
||||
action = menu.addAction(icon, label)
|
||||
action = menu.addAction(icon, trConst(label))
|
||||
action.triggered.connect(lambda _, shape=shape: self._selectShape(shape))
|
||||
self._icons[shape] = icon
|
||||
|
||||
|
||||
+20
-20
@@ -209,25 +209,25 @@ class nwBuildFmt(Enum):
|
||||
|
||||
class nwStatusShape(Enum):
|
||||
|
||||
SQUARE = 0
|
||||
TRIANGLE = 1
|
||||
NABLA = 2
|
||||
DIAMOND = 3
|
||||
PENTAGON = 4
|
||||
HEXAGON = 5
|
||||
STAR = 6
|
||||
PACMAN = 7
|
||||
CIRCLE_Q = 8
|
||||
CIRCLE_H = 9
|
||||
CIRCLE_T = 10
|
||||
CIRCLE = 11
|
||||
BARS_1 = 12
|
||||
BARS_2 = 13
|
||||
BARS_3 = 14
|
||||
BARS_4 = 15
|
||||
BLOCK_1 = 16
|
||||
BLOCK_2 = 17
|
||||
BLOCK_3 = 18
|
||||
BLOCK_4 = 19
|
||||
SQUARE = 0
|
||||
TRIANGLE = 1
|
||||
NABLA = 2
|
||||
DIAMOND = 3
|
||||
PENTAGON = 4
|
||||
HEXAGON = 5
|
||||
STAR = 6
|
||||
PACMAN = 7
|
||||
CIRCLE_Q = 8
|
||||
CIRCLE_H = 9
|
||||
CIRCLE_T = 10
|
||||
CIRCLE = 11
|
||||
BARS_1 = 12
|
||||
BARS_2 = 13
|
||||
BARS_3 = 14
|
||||
BARS_4 = 15
|
||||
BLOCK_1 = 16
|
||||
BLOCK_2 = 17
|
||||
BLOCK_3 = 18
|
||||
BLOCK_4 = 19
|
||||
|
||||
# END Enum nwStatusShape
|
||||
|
||||
Reference in New Issue
Block a user