Skip to content

Commit 95d5272

Browse files
add border to clicked tiles
Signed-off-by: Jonathan Irvin <djfoxyslpr@gmail.com>
1 parent dfb45f8 commit 95d5272

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# UI Class Constants
3636
BOARD_CONTAINER_CLASS = "flex justify-center items-center w-full"
3737
HEADER_CONTAINER_CLASS = "w-full"
38-
CARD_CLASSES = "relative p-2 rounded-xl w-full h-full flex items-center justify-center"
38+
CARD_CLASSES = "relative p-2 rounded-xl shadow-8 w-full h-full flex items-center justify-center"
3939
COLUMN_CLASSES = "flex flex-col items-center justify-center gap-0 w-full"
4040
GRID_CONTAINER_CLASS = "w-full aspect-square p-4"
4141
GRID_CLASSES = "gap-2 h-full grid-rows-5"
@@ -490,7 +490,8 @@ def build_board(parent, tile_buttons_dict: dict, on_tile_click):
490490
tile_buttons_dict[(row_idx, col_idx)] = {"card": card, "labels": labels_list}
491491
if phrase.upper() == FREE_SPACE_TEXT:
492492
clicked_tiles.add((row_idx, col_idx))
493-
card.style(f"color: {FREE_SPACE_TEXT_COLOR}; border: none;")
493+
card.style(f"color: {FREE_SPACE_TEXT_COLOR}; border: none; outline: 3px solid {TILE_CLICKED_TEXT_COLOR};")
494+
494495
else:
495496
card.on("click", lambda e, r=row_idx, c=col_idx: on_tile_click(r, c))
496497
return tile_buttons_dict
@@ -504,7 +505,7 @@ def update_tile_styles(tile_buttons_dict: dict):
504505
phrase = board[r][c]
505506

506507
if (r, c) in clicked_tiles:
507-
new_card_style = f"background-color: {TILE_CLICKED_BG_COLOR}; color: {TILE_CLICKED_TEXT_COLOR}; border: none;"
508+
new_card_style = f"background-color: {TILE_CLICKED_BG_COLOR}; color: {TILE_CLICKED_TEXT_COLOR}; border: none; outline: 3px solid {TILE_CLICKED_TEXT_COLOR};"
508509
new_label_color = TILE_CLICKED_TEXT_COLOR
509510
else:
510511
new_card_style = f"background-color: {TILE_UNCLICKED_BG_COLOR}; color: {TILE_UNCLICKED_TEXT_COLOR}; border: none;"

0 commit comments

Comments
 (0)