MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / view_controls_overlay_panel

Method view_controls_overlay_panel

src/controls.rs:390–409  ·  view source on GitHub ↗
(
        &self,
        has_legend: bool,
    )

Source from the content-addressed store, hash-verified

388
389impl 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
412impl PlotControls {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80
binding_descriptionsMethod · 0.80

Tested by

no test coverage detected