diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-01-21 21:32:06 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-01-21 21:32:06 +0100 |
| commit | 96d304338717d50a7365b431ccb357942b414ea7 (patch) | |
| tree | 81dc4a112325d51143a3a5c3f4fdd90ad43dfd08 /src/main.rs | |
| parent | d4dce0982c79714eba10d46830d7c0176cacdfdd (diff) | |
set darktheme and fix text overflow in canvas
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index a00d137..5565edb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,6 +37,7 @@ impl Application for Graph { &pane, Pane::new(PaneKind::GraphPane), ); + ( Graph { graph_canvas: GraphCanvas::new(), @@ -73,6 +74,7 @@ impl Application for Graph { self.graph_canvas.clear(); } Message::Resized(pane_grid::ResizeEvent { split, ratio }) => { + self.graph_canvas.clear(); self.panes.resize(&split, ratio); } } @@ -95,7 +97,7 @@ impl Application for Graph { text_input("f(x) = x^2", f) .on_input(move |s| Message::InputChanged(s, i)) .on_submit(Message::UpdateFunction(i)), - button("R").on_press(Message::RemoveFunction(i)) + button("-").on_press(Message::RemoveFunction(i)) ].padding(5) ); } @@ -126,4 +128,8 @@ impl Application for Graph { .padding(10) .into() } + + fn theme(&self) -> Self::Theme { + Theme::Dark + } } |