mirror of
https://github.com/enzet/map-machine.git
synced 2025-07-29 22:37:54 +02:00
Refactor icon colors.
This commit is contained in:
parent
bd026c2c73
commit
a082722b6d
3 changed files with 26 additions and 15 deletions
|
@ -410,6 +410,14 @@ class Scheme:
|
|||
logging.debug(f"Unknown color `{color}`.")
|
||||
return Color(self.colors["default"])
|
||||
|
||||
def get_default_color(self) -> Color:
|
||||
"""Get default color for a main icon."""
|
||||
return self.get_color("default")
|
||||
|
||||
def get_extra_color(self) -> Color:
|
||||
"""Get default color for an extra icon."""
|
||||
return self.get_color("extra")
|
||||
|
||||
def get(self, variable_name: str):
|
||||
"""
|
||||
FIXME: colors should be variables.
|
||||
|
@ -529,7 +537,7 @@ class Scheme:
|
|||
if matcher.add_shapes:
|
||||
specifications = [
|
||||
self.get_shape_specification(
|
||||
x, extractor, color=Color("#888888")
|
||||
x, extractor, color=self.get_extra_color()
|
||||
)
|
||||
for x in matcher.add_shapes
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue