mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-03 08:40:11 +02:00
Fix icon grid generation.
This commit is contained in:
parent
611a4d85a8
commit
dc62bb3d84
2 changed files with 8 additions and 3 deletions
|
@ -209,10 +209,12 @@ def draw_icons() -> None:
|
|||
extractor: ShapeExtractor = ShapeExtractor(
|
||||
workspace.ICONS_PATH, workspace.ICONS_CONFIG_PATH
|
||||
)
|
||||
collection: IconCollection = IconCollection.from_scheme(
|
||||
scheme, extractor, add_all=True
|
||||
)
|
||||
collection: IconCollection = IconCollection.from_scheme(scheme, extractor)
|
||||
collection.sort()
|
||||
for icon in collection.icons:
|
||||
icon.recolor(Color("#444444"))
|
||||
icon_grid_path: Path = workspace.get_icon_grid_path()
|
||||
collection.draw_grid(workspace.GRID_PATH)
|
||||
collection.draw_grid(icon_grid_path)
|
||||
logging.info(f"Icon grid is written to {icon_grid_path}.")
|
||||
|
||||
|
|
|
@ -25,7 +25,10 @@ class Workspace:
|
|||
DEFAULT_SCHEME_PATH: Path = SCHEME_PATH / "default.yml"
|
||||
ICONS_PATH: Path = HERE / Path("icons/icons.svg")
|
||||
ICONS_CONFIG_PATH: Path = HERE / Path("icons/config.json")
|
||||
|
||||
GITHUB_TEST_PATH: Path = Path(".github/workflows/test.yml")
|
||||
DOCUMENTATION_PATH: Path = Path("doc")
|
||||
GRID_PATH: Path = DOCUMENTATION_PATH / "grid.svg"
|
||||
|
||||
# Generated directories and files.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue