Change the menu icon to three dots

This commit is contained in:
Veronica Berglyd Olsen committed 2023-11-08 16:54:15 +01:00
1 parent b3ae1774a8
commit 9282b39f2a
10 files changed
+120 -140

No files matched your search

+5 -3
View File
@@ -28,7 +28,7 @@ import json
import logging
from enum import Enum
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, TypeVar
from pathlib import Path
from novelwriter.error import logException
@@ -40,6 +40,8 @@ if TYPE_CHECKING: # pragma: no cover
logger = logging.getLogger(__name__)
NWEnum = TypeVar("NWEnum", bound=Enum)
VALID_MAP = {
"GuiWritingStats": {
"winWidth", "winHeight", "widthCol0", "widthCol1", "widthCol2",
@@ -201,11 +203,11 @@ class OptionState:
return checkBool(self._state[group].get(name, default), default)
return default
def getEnum(self, group: str, name: str, lookup: type, default: Enum) -> Enum:
def getEnum(self, group: str, name: str, lookup: type, default: NWEnum) -> NWEnum:
"""Return the value mapped to an enum. Otherwise return the
default value.
"""
if issubclass(lookup, Enum):
if issubclass(lookup, type(default)):
if group in self._state:
if name in self._state[group]:
value = self._state[group][name]