Fix icon grid generation.

This commit is contained in:
Sergey Vartanov 2021-11-24 10:51:17 +03:00
parent 611a4d85a8
commit dc62bb3d84
2 changed files with 8 additions and 3 deletions

View file

@ -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}.")

View file

@ -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.