Skip to content

Commit ffc6ea5

Browse files
committed
Update UI colors and font sizes for improved appearance
Increased the top bar height and font sizes in the menu for better readability. Updated text box and background colors in the menu for a lighter appearance. Standardized color usage in tplot by applying scale_to_01 to all color constants.
1 parent 056e1c4 commit ffc6ea5

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

tilingsgui/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class TilingGui(pyglet.window.Window):
3232
_INITIAL_WIDTH: ClassVar[int] = 800
3333
_INITIAL_HEIGHT: ClassVar[int] = 650
3434
_RIGHT_BAR_WIDTH: ClassVar[int] = 200
35-
_TOP_BAR_HEIGHT: ClassVar[int] = 24
35+
_TOP_BAR_HEIGHT: ClassVar[int] = 40
3636
_CLEAR_COLOR: ClassVar[Tuple[float, float, float, float]] = (
3737
Color.alpha_extend_and_scale_to_01(Color.WHITE)
3838
)

tilingsgui/menu.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ class TopMenu(pyglet.event.EventDispatcher, Observer):
2020

2121
_PADDING = 1
2222
_INITIAL_MESSAGE = " -- Basis here -- e.g. 1234_1324"
23-
_FONT_SIZE = 12
23+
_FONT_SIZE = 14
2424
_TEXT_COLOR = Color.alpha_extend(Color.BLACK)
25-
_TEXT_BOX_COLOR = Color.DARK_GRAY
25+
_TEXT_BOX_COLOR = Color.scale_to_01(Color.WHITE)
2626
_BACKGROUND_COLOR = Color.BLACK
2727
_V_BTN = 118
2828
_CTRL_MODIFIER = 18
@@ -192,11 +192,11 @@ class RightMenu(pyglet.event.EventDispatcher, Observer):
192192
"""A menu that sits to the right of the tiling plot."""
193193

194194
_PADDING = 1
195-
_INITIAL_MESSAGE = "12"
196-
_FONT_SIZE = 12
195+
_INITIAL_MESSAGE = "Req: 12"
196+
_FONT_SIZE = 14
197197
_TEXT_COLOR = Color.alpha_extend(Color.BLACK)
198-
_TEXT_BOX_COLOR = Color.DARK_GRAY
199-
_BACKGROUND_COLOR = Color.BLACK
198+
_TEXT_BOX_COLOR = Color.scale_to_01(Color.WHITE)
199+
_BACKGROUND_COLOR = Color.scale_to_01(Color.LIGHT_GRAY)
200200

201201
def __init__(
202202
self,

tilingsgui/tplot.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,19 @@ class TPlot:
3434

3535
REQ_NOT_FOUND: ClassVar[Tuple[int, int, int]] = (-1, -1, -1)
3636
OBS_NOT_FOUND: ClassVar[Tuple[int, int]] = (-1, -1)
37-
_OBSTRUCTION_COLOR: ClassVar[Tuple[float, float, float]] = Color.RED
38-
_REQUIREMENT_COLOR: ClassVar[Tuple[float, float, float]] = Color.BLUE
39-
_HIGHLIGHT_COLOR: ClassVar[Tuple[float, float, float]] = Color.ORANGE
40-
_EMPTY_COLOR: ClassVar[Tuple[float, float, float]] = Color.GRAY
41-
_SHADED_CELL_COLOR: ClassVar[Tuple[float, float, float]] = Color.GRAY
37+
_OBSTRUCTION_COLOR: ClassVar[Tuple[float, float, float]] = Color.scale_to_01(
38+
Color.RED
39+
)
40+
_REQUIREMENT_COLOR: ClassVar[Tuple[float, float, float]] = Color.scale_to_01(
41+
Color.BLUE
42+
)
43+
_HIGHLIGHT_COLOR: ClassVar[Tuple[float, float, float]] = Color.scale_to_01(
44+
Color.ORANGE
45+
)
46+
_EMPTY_COLOR: ClassVar[Tuple[float, float, float]] = Color.scale_to_01(Color.GRAY)
47+
_SHADED_CELL_COLOR: ClassVar[Tuple[float, float, float]] = Color.scale_to_01(
48+
Color.GRAY
49+
)
4250
_FUZZYNESS = 0.25 # Should be in [0,0.5)
4351
_CLICK_PRECISION_SQUARED: int = 100
4452
_POINT_SIZE = 5

0 commit comments

Comments
 (0)