Add dark/light toggle button to sidebar
This commit is contained in:
@@ -28,7 +28,8 @@ from typing import Final
|
||||
from PyQt6.QtCore import QT_TRANSLATE_NOOP, QCoreApplication
|
||||
|
||||
from novelwriter.enum import (
|
||||
nwBuildFmt, nwComment, nwItemClass, nwItemLayout, nwOutline, nwStatusShape
|
||||
nwBuildFmt, nwComment, nwItemClass, nwItemLayout, nwOutline, nwStatusShape,
|
||||
nwTheme
|
||||
)
|
||||
|
||||
|
||||
@@ -453,6 +454,16 @@ class nwLabels:
|
||||
"blue": QT_TRANSLATE_NOOP("Constant", "Blue"),
|
||||
"purple": QT_TRANSLATE_NOOP("Constant", "Purple"),
|
||||
}
|
||||
THEME_MODE_ICON: Final[dict[nwTheme, str]] = {
|
||||
nwTheme.AUTO: "theme_auto",
|
||||
nwTheme.LIGHT: "theme_light",
|
||||
nwTheme.DARK: "theme_dark",
|
||||
}
|
||||
THEME_MODE_LABEL: Final[dict[nwTheme, str]] = {
|
||||
nwTheme.AUTO: QT_TRANSLATE_NOOP("Constant", "System Theme"),
|
||||
nwTheme.LIGHT: QT_TRANSLATE_NOOP("Constant", "Light Theme"),
|
||||
nwTheme.DARK: QT_TRANSLATE_NOOP("Constant", "Dark Theme"),
|
||||
}
|
||||
|
||||
|
||||
class nwHeadFmt:
|
||||
|
||||
Reference in New Issue
Block a user