kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Fixed chevron size mismatch.
I decided I wanted the first chevron a little smaller, and realized I had the sign of the chevron height value reversed. The initial white triangle is now a bit smaller, and the chevron stripes slightly wider.pull/506/head
rodzic
6292d33cdb
commit
213e47ffd7
|
@ -36,7 +36,7 @@ COLOUR_ORDER = [RED, ORANGE, YELLOW, GREEN, INDIGO, VIOLET] # traditional pride
|
|||
# CHEVRONS = [] # No chevrons
|
||||
CHEVRONS = [WHITE, PINK, BLUE, BROWN, BLACK] # Progress Pride Flag
|
||||
# Initial chevron height compared to screen height
|
||||
FIRST_CHEVRON_HEIGHT = 0.5
|
||||
FIRST_CHEVRON_HEIGHT = 0.4
|
||||
|
||||
# Change this for vertical stripes
|
||||
STRIPES_DIRECTION = "horizontal"
|
||||
|
@ -63,7 +63,7 @@ if STRIPES_DIRECTION == "vertical":
|
|||
display.rectangle(stripe_width * x, 0, stripe_width, HEIGHT)
|
||||
|
||||
if len(CHEVRONS) > 0:
|
||||
stripe_width = round((HEIGHT * FIRST_CHEVRON_HEIGHT) / len(CHEVRONS))
|
||||
stripe_width = round((HEIGHT * (1 - FIRST_CHEVRON_HEIGHT)) / len(CHEVRONS))
|
||||
offset = -stripe_width * math.floor((len(CHEVRONS) + 1) / 2)
|
||||
middle = round(HEIGHT / 2)
|
||||
for x in range(len(CHEVRONS) - 1, -1, -1):
|
||||
|
|
Ładowanie…
Reference in New Issue