max / makeover-immediate
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
1 file changed,
+8 insertions,
-6 deletions
| @@ -96,8 +96,7 @@ | |||
| 96 | 96 | // bar is a thing set into the page with something in it, which is what | |
| 97 | 97 | // `Fill::Sunken` means, and tinting the empty half would read as a | |
| 98 | 98 | // second, paler proportion. | |
| 99 | - | ui.painter() | |
| 100 | - | .rect_filled(rect, style.radius, palette.sunken); | |
| 99 | + | ui.painter().rect_filled(rect, style.radius, palette.sunken); | |
| 101 | 100 | let share = if meter.total == 0 { | |
| 102 | 101 | 0.0 | |
| 103 | 102 | } else { | |
| @@ -205,9 +204,7 @@ | |||
| 205 | 204 | /// exactly what `disabled` means on every host, and here the host already has | |
| 206 | 205 | /// the machinery. | |
| 207 | 206 | pub fn act(ui: &mut Ui, act: &Act<'_>, palette: &Palette, _style: &WidgetStyle) -> Response { | |
| 208 | - | let disabled = act | |
| 209 | - | .state | |
| 210 | - | .is_some_and(State::suppresses_interaction); | |
| 207 | + | let disabled = act.state.is_some_and(State::suppresses_interaction); | |
| 211 | 208 | let label = match act.key { | |
| 212 | 209 | Some(key) => format!("{} ({key})", act.label), | |
| 213 | 210 | None => act.label.to_owned(), | |
| @@ -230,7 +227,12 @@ | |||
| 230 | 227 | /// movement that reads as good or bad. `makeover-tui` says the same thing with a | |
| 231 | 228 | /// bold span; here it is a larger one, because egui can size text and a terminal | |
| 232 | 229 | /// cannot. | |
| 233 | - | pub fn figure(ui: &mut Ui, figure: &Figure<'_>, palette: &Palette, style: &WidgetStyle) -> Response { | |
| 230 | + | pub fn figure( | |
| 231 | + | ui: &mut Ui, | |
| 232 | + | figure: &Figure<'_>, | |
| 233 | + | palette: &Palette, | |
| 234 | + | style: &WidgetStyle, | |
| 235 | + | ) -> Response { | |
| 234 | 236 | ui.with_layout(Layout::top_down(Align::Min), |ui| { | |
| 235 | 237 | let value = match figure.change { | |
| 236 | 238 | Some(change) => format!("{} {change}", figure.value), |