Merge branch 'main' into espresso_theme
This commit is contained in:
@@ -55,8 +55,6 @@ A colour theme ``.conf`` file consists of the following settings:
|
|||||||
author = Veronica Berglyd Olsen
|
author = Veronica Berglyd Olsen
|
||||||
credit = Veronica Berglyd Olsen
|
credit = Veronica Berglyd Olsen
|
||||||
url = https://github.com/vkbo/novelWriter
|
url = https://github.com/vkbo/novelWriter
|
||||||
license = CC BY-SA 4.0
|
|
||||||
licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
|
|
||||||
|
|
||||||
[Base]
|
[Base]
|
||||||
base = #fcfcfc
|
base = #fcfcfc
|
||||||
@@ -140,7 +138,7 @@ affects.
|
|||||||
:header: "Section", "Description"
|
:header: "Section", "Description"
|
||||||
:class: "tight-table"
|
:class: "tight-table"
|
||||||
|
|
||||||
"``[Main]``", "Meta data about the theme, You must at least set ``name`` and ``mode``, and ``mode`` must be either ``light`` or ``dark``."
|
"``[Main]``", "Meta data about the theme, You must at least set ``name``, ``mode`` and ``author``, and ``mode`` must be either ``light`` or ``dark``."
|
||||||
"``[Base]``", "The base colours of the theme. These are also selectable colours in various places inside the app, like for icon colours in **Preferences**."
|
"``[Base]``", "The base colours of the theme. These are also selectable colours in various places inside the app, like for icon colours in **Preferences**."
|
||||||
"``[Project]``", "The colours used for icons and markers for the different project item types."
|
"``[Project]``", "The colours used for icons and markers for the different project item types."
|
||||||
"``[Palette]``", "The colours used for styling the user interface. The values correspond to the ColorRole_ values in the Qt library."
|
"``[Palette]``", "The colours used for styling the user interface. The values correspond to the ColorRole_ values in the Qt library."
|
||||||
@@ -177,6 +175,8 @@ There are several ways to enter colour values:
|
|||||||
.. versionadded:: 2.8
|
.. versionadded:: 2.8
|
||||||
The ``[Syntax]`` section was moved into the main theme file. Previously, these settings were in
|
The ``[Syntax]`` section was moved into the main theme file. Previously, these settings were in
|
||||||
their own file. The ``[Icons]`` section was renamed to ``[Base]``. Added the ``line`` setting.
|
their own file. The ``[Icons]`` section was renamed to ``[Base]``. Added the ``line`` setting.
|
||||||
|
Dropped the ``license`` and ``licenseurl`` settings. The ``description`` and ``author`` fields
|
||||||
|
are now required if the theme is included in the app, but not for user themes.
|
||||||
|
|
||||||
|
|
||||||
Icon Themes
|
Icon Themes
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Blue Streak Dark
|
name = Blue Streak Dark
|
||||||
mode = dark
|
mode = dark
|
||||||
author = Veronica Berglyd Olsen
|
description = A theme mainly using shades of blue
|
||||||
credit = Veronica Berglyd Olsen
|
author = Veronica Berglyd Olsen
|
||||||
url = https://github.com/vkbo/novelWriter
|
credit = Veronica Berglyd Olsen
|
||||||
license = CC BY-SA 4.0
|
url = https://github.com/vkbo/novelWriter
|
||||||
licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
|
|
||||||
|
|
||||||
[Base]
|
[Base]
|
||||||
base = #2d2d2d
|
base = #2d2d2d
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Blue Streak Light
|
name = Blue Streak Light
|
||||||
mode = light
|
mode = light
|
||||||
author = Veronica Berglyd Olsen
|
description = A theme mainly using shades of blue
|
||||||
credit = Veronica Berglyd Olsen
|
author = Veronica Berglyd Olsen
|
||||||
url = https://github.com/vkbo/novelWriter
|
credit = Veronica Berglyd Olsen
|
||||||
license = CC BY-SA 4.0
|
url = https://github.com/vkbo/novelWriter
|
||||||
licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
|
|
||||||
|
|
||||||
[Base]
|
[Base]
|
||||||
base = #fcfcfc
|
base = #fcfcfc
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ mode = dark
|
|||||||
description = A taste of the future 80s
|
description = A taste of the future 80s
|
||||||
author = Anders Lemvigh
|
author = Anders Lemvigh
|
||||||
url = https://github.com/alemvigh
|
url = https://github.com/alemvigh
|
||||||
license = CC BY-SA 4.0
|
|
||||||
licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
|
|
||||||
|
|
||||||
[Base]
|
[Base]
|
||||||
base = #000000
|
base = #000000
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ description = The novelWriter standard dark theme
|
|||||||
author = Veronica Berglyd Olsen
|
author = Veronica Berglyd Olsen
|
||||||
credit = Veronica Berglyd Olsen
|
credit = Veronica Berglyd Olsen
|
||||||
url = https://github.com/vkbo/novelWriter
|
url = https://github.com/vkbo/novelWriter
|
||||||
license = CC BY-SA 4.0
|
|
||||||
licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
|
|
||||||
|
|
||||||
[Base]
|
[Base]
|
||||||
base = #373737
|
base = #373737
|
||||||
@@ -63,7 +61,7 @@ headertext = green
|
|||||||
headertag = green:D150
|
headertag = green:D150
|
||||||
emphasis = orange
|
emphasis = orange
|
||||||
dialog = blue
|
dialog = blue
|
||||||
altdialog = blue
|
altdialog = red
|
||||||
note = yellow
|
note = yellow
|
||||||
hidden = faded
|
hidden = faded
|
||||||
shortcode = green
|
shortcode = green
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ description = The novelWriter standard light theme
|
|||||||
author = Veronica Berglyd Olsen
|
author = Veronica Berglyd Olsen
|
||||||
credit = Veronica Berglyd Olsen
|
credit = Veronica Berglyd Olsen
|
||||||
url = https://github.com/vkbo/novelWriter
|
url = https://github.com/vkbo/novelWriter
|
||||||
license = CC BY-SA 4.0
|
|
||||||
licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
|
|
||||||
|
|
||||||
[Base]
|
[Base]
|
||||||
base = #fcfcfc
|
base = #fcfcfc
|
||||||
@@ -63,7 +61,7 @@ headertext = green
|
|||||||
headertag = green:L135
|
headertag = green:L135
|
||||||
emphasis = orange
|
emphasis = orange
|
||||||
dialog = blue
|
dialog = blue
|
||||||
altdialog = blue
|
altdialog = red
|
||||||
note = yellow:D125
|
note = yellow:D125
|
||||||
hidden = faded
|
hidden = faded
|
||||||
shortcode = green
|
shortcode = green
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ description = A dark theme with bright colours
|
|||||||
author = Veronica Berglyd Olsen (adaptation)
|
author = Veronica Berglyd Olsen (adaptation)
|
||||||
credit = Zeno Rocha
|
credit = Zeno Rocha
|
||||||
url = https://draculatheme.com
|
url = https://draculatheme.com
|
||||||
license = MIT
|
|
||||||
licenseurl = https://github.com/dracula/dracula-theme/blob/main/LICENSE
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Colours:
|
# Colours:
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Grey Dark
|
name = Grey Dark
|
||||||
mode = dark
|
mode = dark
|
||||||
author = Veronica Berglyd Olsen
|
description = A theme with minimal colours
|
||||||
credit = Veronica Berglyd Olsen
|
author = Veronica Berglyd Olsen
|
||||||
url = https://github.com/vkbo/novelWriter
|
credit = Veronica Berglyd Olsen
|
||||||
license = CC BY-SA 4.0
|
url = https://github.com/vkbo/novelWriter
|
||||||
licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
|
|
||||||
|
|
||||||
[Base]
|
[Base]
|
||||||
base = #3e3e3e
|
base = #3e3e3e
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Grey Light
|
name = Grey Light
|
||||||
mode = light
|
mode = light
|
||||||
author = Veronica Berglyd Olsen
|
description = A theme with minimal colours
|
||||||
credit = Veronica Berglyd Olsen
|
author = Veronica Berglyd Olsen
|
||||||
url = https://github.com/vkbo/novelWriter
|
credit = Veronica Berglyd Olsen
|
||||||
license = CC BY-SA 4.0
|
url = https://github.com/vkbo/novelWriter
|
||||||
licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
|
|
||||||
|
|
||||||
[Base]
|
[Base]
|
||||||
base = #ffffff
|
base = #ffffff
|
||||||
|
|||||||
@@ -3,10 +3,8 @@ name = LCARS
|
|||||||
mode = dark
|
mode = dark
|
||||||
description = The Next Generation of Star Trek colours
|
description = The Next Generation of Star Trek colours
|
||||||
author = Veronica Berglyd Olsen
|
author = Veronica Berglyd Olsen
|
||||||
credit = Veronica Berglyd Olsen
|
credit = Star Trek TNG
|
||||||
url = https://github.com/vkbo/novelWriter
|
url = https://github.com/vkbo/novelWriter
|
||||||
license = CC BY-SA 4.0
|
|
||||||
licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
|
|
||||||
|
|
||||||
[Base]
|
[Base]
|
||||||
base = #101010
|
base = #101010
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Light Owl
|
name = Light Owl
|
||||||
mode = light
|
mode = light
|
||||||
author = Veronica Berglyd Olsen (adaptation)
|
description = A theme for the night owls out there, but for daylight
|
||||||
credit = Sarah Drasner (color theme)
|
author = Veronica Berglyd Olsen
|
||||||
url = https://github.com/sdras/night-owl-vscode-theme
|
credit = Sarah Drasner
|
||||||
license = MIT License
|
url = https://github.com/sdras/night-owl-vscode-theme
|
||||||
licenseurl = https://github.com/sdras/night-owl-vscode-theme/blob/master/LICENSE
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Theme: Light Owl
|
# Theme: Light Owl
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Night Owl
|
name = Night Owl
|
||||||
mode = dark
|
mode = dark
|
||||||
author = Veronica Berglyd Olsen (adaptation)
|
description = A theme for the night owls out there
|
||||||
credit = Sarah Drasner (color theme)
|
author = Veronica Berglyd Olsen
|
||||||
url = https://github.com/sdras/night-owl-vscode-theme
|
credit = Sarah Drasner
|
||||||
license = MIT License
|
url = https://github.com/sdras/night-owl-vscode-theme
|
||||||
licenseurl = https://github.com/sdras/night-owl-vscode-theme/blob/master/LICENSE
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Theme: Night Owl
|
# Theme: Night Owl
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Primer Light
|
name = Primer Light
|
||||||
mode = light
|
mode = light
|
||||||
author = Myian (adaptation)
|
description = Primer
|
||||||
credit = GitHub Inc.
|
author = Myian
|
||||||
url = https://github.com/primer
|
credit = GitHub Inc.
|
||||||
license = MIT License
|
url = https://github.com/primer
|
||||||
licenseurl = https://github.com/primer/brand/blob/main/LICENSE
|
|
||||||
|
|
||||||
[Base]
|
[Base]
|
||||||
base = #ffffff
|
base = #ffffff
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Primer Night
|
name = Primer Night
|
||||||
mode = dark
|
mode = dark
|
||||||
author = Myian (adaptation)
|
description = Primer
|
||||||
credit = GitHub Inc.
|
author = Myian
|
||||||
url = https://github.com/primer
|
credit = GitHub Inc.
|
||||||
license = MIT License
|
url = https://github.com/primer
|
||||||
licenseurl = https://github.com/primer/brand/blob/main/LICENSE
|
|
||||||
|
|
||||||
[Base]
|
[Base]
|
||||||
base = #0d1117
|
base = #0d1117
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Snazzy Light
|
name = Snazzy Light
|
||||||
mode = light
|
mode = light
|
||||||
author = Veronica Berglyd Olsen (adaptation)
|
description = A vivid light color theme
|
||||||
credit = Florian Reuschel (color theme)
|
author = Veronica Berglyd Olsen
|
||||||
url = https://github.com/loilo/vscode-snazzy-light
|
credit = Florian Reuschel, Sindre Sorhus
|
||||||
license = MIT License
|
url = https://github.com/loilo/vscode-snazzy-light
|
||||||
licenseurl = https://github.com/loilo/vscode-snazzy-light/blob/master/LICENSE
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Colours:
|
# Colours:
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Solarized Dark
|
name = Solarized Dark
|
||||||
mode = dark
|
mode = dark
|
||||||
author = nullbasis
|
description = Precision colors for machines and people
|
||||||
credit = Ethan Schoonover
|
author = nullbasis, Veronica Berglyd Olsen
|
||||||
url = https://ethanschoonover.com/solarized/
|
credit = Ethan Schoonover
|
||||||
license = MIT
|
url = https://ethanschoonover.com/solarized/
|
||||||
licenseurl = https://github.com/altercation/solarized/blob/master/LICENSE
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# base03: #002b36
|
# base03: #002b36
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Solarized Light
|
name = Solarized Light
|
||||||
mode = light
|
mode = light
|
||||||
author = nullbasis
|
description = Precision colors for machines and people
|
||||||
credit = Ethan Schoonover
|
author = nullbasis, Veronica Berglyd Olsen
|
||||||
url = https://ethanschoonover.com/solarized/
|
credit = Ethan Schoonover
|
||||||
license = MIT
|
url = https://ethanschoonover.com/solarized/
|
||||||
licenseurl = https://github.com/altercation/solarized/blob/master/LICENSE
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# base03: #002b36
|
# base03: #002b36
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Tango Dark
|
name = Tango Dark
|
||||||
mode = dark
|
mode = dark
|
||||||
author = Veronica Berglyd Olsen (adaptation)
|
description = Colors for everyone
|
||||||
|
author = Veronica Berglyd Olsen
|
||||||
|
credit = Tango Desktop Project
|
||||||
|
url = https://en.wikipedia.org/wiki/Tango_Desktop_Project
|
||||||
|
|
||||||
##
|
##
|
||||||
# Colours:
|
# Colours:
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Tango Light
|
name = Tango Light
|
||||||
mode = light
|
mode = light
|
||||||
author = Veronica Berglyd Olsen (adaptation)
|
description = Colors for everyone
|
||||||
|
author = Veronica Berglyd Olsen
|
||||||
|
credit = Tango Desktop Project
|
||||||
|
url = https://en.wikipedia.org/wiki/Tango_Desktop_Project
|
||||||
|
|
||||||
##
|
##
|
||||||
# Colours:
|
# Colours:
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Tomorrow
|
name = Tomorrow
|
||||||
mode = light
|
mode = light
|
||||||
author = Veronica Berglyd Olsen (adaptation)
|
description = A colourful theme with muted colours and sensible highlighting
|
||||||
credit = Chris Kempson (color theme)
|
author = Veronica Berglyd Olsen
|
||||||
url = https://github.com/chriskempson/tomorrow-theme
|
credit = Chris Kempson
|
||||||
license = MIT License
|
url = https://github.com/chriskempson/tomorrow-theme
|
||||||
licenseurl = https://github.com/chriskempson/tomorrow-theme/blob/master/LICENSE.md
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Theme: Tomorrow
|
# Theme: Tomorrow
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Tomorrow Night
|
name = Tomorrow Night
|
||||||
mode = dark
|
mode = dark
|
||||||
author = Veronica Berglyd Olsen (adaptation)
|
description = A colourful theme with muted colours and sensible highlighting
|
||||||
credit = Chris Kempson (color theme)
|
author = Veronica Berglyd Olsen
|
||||||
url = https://github.com/chriskempson/tomorrow-theme
|
credit = Chris Kempson
|
||||||
license = MIT License
|
url = https://github.com/chriskempson/tomorrow-theme
|
||||||
licenseurl = https://github.com/chriskempson/tomorrow-theme/blob/master/LICENSE.md
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Theme: Tomorrow Night
|
# Theme: Tomorrow Night
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Tomorrow Night Blue
|
name = Tomorrow Night Blue
|
||||||
mode = dark
|
mode = dark
|
||||||
author = Veronica Berglyd Olsen (adaptation)
|
description = A colourful theme with muted colours and sensible highlighting
|
||||||
credit = Chris Kempson (color theme)
|
author = Veronica Berglyd Olsen
|
||||||
url = https://github.com/chriskempson/tomorrow-theme
|
credit = Chris Kempson
|
||||||
license = MIT License
|
url = https://github.com/chriskempson/tomorrow-theme
|
||||||
licenseurl = https://github.com/chriskempson/tomorrow-theme/blob/master/LICENSE.md
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Theme: Tomorrow Night Blue
|
# Theme: Tomorrow Night Blue
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Tomorrow Night Bright
|
name = Tomorrow Night Bright
|
||||||
mode = dark
|
mode = dark
|
||||||
author = Veronica Berglyd Olsen (adaptation)
|
description = A colourful theme with muted colours and sensible highlighting
|
||||||
credit = Chris Kempson (color theme)
|
author = Veronica Berglyd Olsen
|
||||||
url = https://github.com/chriskempson/tomorrow-theme
|
credit = Chris Kempson
|
||||||
license = MIT License
|
url = https://github.com/chriskempson/tomorrow-theme
|
||||||
licenseurl = https://github.com/chriskempson/tomorrow-theme/blob/master/LICENSE.md
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Theme: Tomorrow Night Bright
|
# Theme: Tomorrow Night Bright
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[Main]
|
[Main]
|
||||||
name = Tomorrow Night Eighties
|
name = Tomorrow Night Eighties
|
||||||
mode = dark
|
mode = dark
|
||||||
author = Veronica Berglyd Olsen (adaptation)
|
description = A colourful theme with muted colours and sensible highlighting
|
||||||
credit = Chris Kempson (color theme)
|
author = Veronica Berglyd Olsen
|
||||||
url = https://github.com/chriskempson/tomorrow-theme
|
credit = Chris Kempson
|
||||||
license = MIT License
|
url = https://github.com/chriskempson/tomorrow-theme
|
||||||
licenseurl = https://github.com/chriskempson/tomorrow-theme/blob/master/LICENSE.md
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Theme: Tomorrow Night Eighties
|
# Theme: Tomorrow Night Eighties
|
||||||
|
|||||||
+15
-12
@@ -72,8 +72,13 @@ class ThemeMeta:
|
|||||||
author: str = ""
|
author: str = ""
|
||||||
credit: str = ""
|
credit: str = ""
|
||||||
url: str = ""
|
url: str = ""
|
||||||
license: str = ""
|
|
||||||
licenseUrl: str = ""
|
|
||||||
|
class IconsMeta:
|
||||||
|
|
||||||
|
name: str = ""
|
||||||
|
author: str = ""
|
||||||
|
license: str = ""
|
||||||
|
|
||||||
|
|
||||||
class SyntaxColors:
|
class SyntaxColors:
|
||||||
@@ -296,12 +301,10 @@ class GuiTheme:
|
|||||||
if parser.has_section(sec):
|
if parser.has_section(sec):
|
||||||
meta.name = parser.get(sec, "name", fallback="")
|
meta.name = parser.get(sec, "name", fallback="")
|
||||||
meta.mode = parser.get(sec, "mode", fallback="light")
|
meta.mode = parser.get(sec, "mode", fallback="light")
|
||||||
meta.description = parser.get(sec, "description", fallback="N/A")
|
meta.description = parser.get(sec, "description", fallback="")
|
||||||
meta.author = parser.get(sec, "author", fallback="N/A")
|
meta.author = parser.get(sec, "author", fallback="")
|
||||||
meta.credit = parser.get(sec, "credit", fallback="N/A")
|
meta.credit = parser.get(sec, "credit", fallback="")
|
||||||
meta.url = parser.get(sec, "url", fallback="")
|
meta.url = parser.get(sec, "url", fallback="")
|
||||||
meta.license = parser.get(sec, "license", fallback="N/A")
|
|
||||||
meta.licenseUrl = parser.get(sec, "licenseurl", fallback="")
|
|
||||||
|
|
||||||
self._meta = meta
|
self._meta = meta
|
||||||
|
|
||||||
@@ -613,13 +616,13 @@ class GuiTheme:
|
|||||||
parser.clear()
|
parser.clear()
|
||||||
parser.read(file, encoding="utf-8")
|
parser.read(file, encoding="utf-8")
|
||||||
name = parser.get("Main", "name", fallback="")
|
name = parser.get("Main", "name", fallback="")
|
||||||
dark = parser.get("Main", "mode", fallback="light").lower() == "dark"
|
mode = parser.get("Main", "mode", fallback="").lower()
|
||||||
if name:
|
if name and mode in ("light", "dark"):
|
||||||
key = file.stem
|
key = file.stem
|
||||||
prefix = "*" if key.startswith("default") else ""
|
prefix = "*" if key.startswith("default") else ""
|
||||||
lookup = f"{prefix}{name} {key}"
|
lookup = f"{prefix}{name} {key}"
|
||||||
keys.append(lookup)
|
keys.append(lookup)
|
||||||
data[lookup] = (file.stem, name, dark, file)
|
data[lookup] = (file.stem, name, mode == "dark", file)
|
||||||
except Exception: # noqa: PERF203
|
except Exception: # noqa: PERF203
|
||||||
logger.error("Could not read file: %s", file)
|
logger.error("Could not read file: %s", file)
|
||||||
logException()
|
logException()
|
||||||
@@ -659,7 +662,7 @@ class GuiIcons:
|
|||||||
def __init__(self, mainTheme: GuiTheme) -> None:
|
def __init__(self, mainTheme: GuiTheme) -> None:
|
||||||
|
|
||||||
self._theme = mainTheme
|
self._theme = mainTheme
|
||||||
self._meta = ThemeMeta()
|
self._meta = IconsMeta()
|
||||||
|
|
||||||
# Storage
|
# Storage
|
||||||
self._allThemes: dict[str, ThemeEntry] = {}
|
self._allThemes: dict[str, ThemeEntry] = {}
|
||||||
@@ -722,7 +725,7 @@ class GuiIcons:
|
|||||||
CONFIG.splashMessage(f"Loading icon theme: {entry.name}")
|
CONFIG.splashMessage(f"Loading icon theme: {entry.name}")
|
||||||
logger.info("Loading icon theme '%s'", theme)
|
logger.info("Loading icon theme '%s'", theme)
|
||||||
try:
|
try:
|
||||||
meta = ThemeMeta()
|
meta = IconsMeta()
|
||||||
with open(entry.path, mode="r", encoding="utf-8") as icons:
|
with open(entry.path, mode="r", encoding="utf-8") as icons:
|
||||||
for icon in icons:
|
for icon in icons:
|
||||||
bits = icon.partition("=")
|
bits = icon.partition("=")
|
||||||
|
|||||||
@@ -613,7 +613,7 @@ def testGuiTheme_CheckTheme(theme):
|
|||||||
|
|
||||||
structure = {
|
structure = {
|
||||||
"Main": [
|
"Main": [
|
||||||
"name", "mode", # The rest are not required
|
"name", "mode", "description", "author", # The rest are not required
|
||||||
],
|
],
|
||||||
"Base": [
|
"Base": [
|
||||||
"base", "default", "faded", "red", "orange", "yellow", "green",
|
"base", "default", "faded", "red", "orange", "yellow", "green",
|
||||||
@@ -638,7 +638,7 @@ def testGuiTheme_CheckTheme(theme):
|
|||||||
"errorline", "replacetag", "modifier", "texthighlight",
|
"errorline", "replacetag", "modifier", "texthighlight",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
optional = ["description", "author", "credit", "url", "license", "licenseurl"]
|
optional = ["credit", "url"]
|
||||||
missing = []
|
missing = []
|
||||||
for section, options in structure.items():
|
for section, options in structure.items():
|
||||||
missing.extend(opt for opt in options if opt not in parser[section])
|
missing.extend(opt for opt in options if opt not in parser[section])
|
||||||
|
|||||||
Reference in New Issue
Block a user