diff --git a/paint.css b/paint.css index 2bc9553..d793b53 100644 --- a/paint.css +++ b/paint.css @@ -26,6 +26,10 @@ Screen { height: 100%; } +#tools_box Button.selected { + background: #aaa; +} + Button { width: 100%; height: 100%; diff --git a/paint.py b/paint.py index 2c7b4d2..c54b354 100644 --- a/paint.py +++ b/paint.py @@ -115,9 +115,8 @@ class PaintApp(App): def watch_selected_tool(self, old_selected_tool: Tool, selected_tool: Tool) -> None: """Called when selected_tool changes.""" - # TODO: revert to default color defined by built-in style - self.query_one("#tool_button_" + old_selected_tool.name).styles.background = "#555" - self.query_one("#tool_button_" + selected_tool.name).styles.background = "#aaa" + self.query_one("#tool_button_" + old_selected_tool.name).classes = "tool_button" + self.query_one("#tool_button_" + selected_tool.name).classes = "tool_button selected" def compose(self) -> ComposeResult: """Add our widgets."""