mirror of
https://github.com/enzet/map-machine.git
synced 2025-04-29 02:08:03 +02:00
Issue #140: fix default colors in scheme.
This commit is contained in:
parent
199dff9599
commit
afb050c2b0
3 changed files with 13 additions and 5 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,12 +1,16 @@
|
|||
# Unreleased
|
||||
# 0.1.7
|
||||
|
||||
_17 August 2022_
|
||||
|
||||
- Redraw diving tower icons.
|
||||
- Add icons for:
|
||||
- `shop=car_parts`, `shop=variety_store` (#48),
|
||||
- `natural=spring` (#55),
|
||||
- `tomb=pyramid`.
|
||||
- Reuse icon for `shop=department_store` (#48).
|
||||
- Redraw fountain icons.
|
||||
- Fix style for `indoor=room` (#139).
|
||||
- Redraw diving tower and fountain icons.
|
||||
- Add `--scheme` option (#140).
|
||||
- Rename `element` command to `draw` and change format.
|
||||
|
||||
# 0.1.6
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ __url__ = "https://github.com/enzet/map-machine"
|
|||
__doc_url__ = f"{__url__}/blob/main/README.md"
|
||||
__author__ = "Sergey Vartanov"
|
||||
__email__ = "me@enzet.ru"
|
||||
__version__ = "0.1.6"
|
||||
__version__ = "0.1.7"
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ __email__ = "me@enzet.ru"
|
|||
|
||||
IconDescription = list[Union[str, dict[str, str]]]
|
||||
|
||||
DEFAULT_COLOR: Color = Color("black")
|
||||
|
||||
|
||||
@dataclass
|
||||
class LineStyle:
|
||||
|
@ -397,7 +399,9 @@ class Scheme:
|
|||
return Color(color)
|
||||
except (ValueError, AttributeError):
|
||||
logging.debug(f"Unknown color `{color}`.")
|
||||
return Color(self.colors["default"])
|
||||
if "default" in self.colors:
|
||||
return Color(self.colors["default"])
|
||||
return DEFAULT_COLOR
|
||||
|
||||
def get_default_color(self) -> Color:
|
||||
"""Get default color for a main icon."""
|
||||
|
|
Loading…
Add table
Reference in a new issue