(
&self,
has_legend: bool,
)
| 388 | |
| 389 | impl PlotControls { |
| 390 | pub(crate) fn view_controls_overlay_panel( |
| 391 | &self, |
| 392 | has_legend: bool, |
| 393 | ) -> Element<'_, PlotUiMessage> { |
| 394 | let txt = |t| widget::text(t).size(12.0).style(widget::text::base); |
| 395 | let mut content = |
| 396 | widget::column![txt("Controls").style(widget::text::primary)].spacing(2.0); |
| 397 | |
| 398 | let mut bindings = self.binding_descriptions(); |
| 399 | bindings.sort(); |
| 400 | |
| 401 | for binding in bindings { |
| 402 | content = content.push(widget::text(binding).size(12.0).style(widget::text::base)); |
| 403 | } |
| 404 | if has_legend { |
| 405 | content = content.push(txt("Click icon in legend to toggle visibility.")); |
| 406 | } |
| 407 | |
| 408 | content.into() |
| 409 | } |
| 410 | } |
| 411 | |
| 412 | impl PlotControls { |
nothing calls this directly
no test coverage detected