mirror of
https://github.com/1j01/textual-paint.git
synced 2024-09-11 15:56:03 +03:00
Repeat first color in palette when loading a palette
This ensures all colors are part of the palette. It would be better to allow the number of color wells to change.
This commit is contained in:
parent
3713e9ed00
commit
9876a3c15c
@ -3441,7 +3441,7 @@ class PaintApp(App[None]):
|
||||
return
|
||||
global palette
|
||||
palette[:len(new_colors)] = new_colors
|
||||
palette[len(new_colors):] = ["#000000"] * (len(palette) - len(new_colors))
|
||||
palette[len(new_colors):] = [new_colors[0]] * (len(palette) - len(new_colors))
|
||||
self.query_one(ColorsBox).update_palette()
|
||||
|
||||
def action_get_colors(self) -> None:
|
||||
|
Loading…
Reference in New Issue
Block a user