Fix icon color in grid.

This commit is contained in:
Sergey Vartanov 2021-05-11 01:02:48 +03:00
parent 792922fd86
commit 2b601b94a6
3 changed files with 4 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Before After
Before After

View file

@ -46,6 +46,7 @@ def draw_all_icons(
for x in element[key]
]
icon: Icon = Icon(specifications)
icon.recolor(Color("#444444"), exclude=Color("white"))
if icon not in icons:
icons.append(icon)
continue

View file

@ -284,12 +284,13 @@ class Icon:
"""
return self.shape_specifications[0].is_default()
def recolor(self, color: Color) -> None:
def recolor(self, color: Color, exclude: Optional[Color] = None) -> None:
"""
Paint all shapes in the color.
"""
for shape_specification in self.shape_specifications:
shape_specification.color = color
if not exclude or shape_specification.color != exclude:
shape_specification.color = color
def add_specifications(
self, specifications: List[ShapeSpecification]