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

Function style2

examples/themes_and_styles.rs:267–304  ·  view source on GitHub ↗
(theme: &Theme)

Source from the content-addressed store, hash-verified

265}
266
267fn style2(theme: &Theme) -> PlotStyle {
268 let palette = theme.extended_palette();
269 let base = default_style(theme);
270
271 PlotStyle {
272 frame: base
273 .frame
274 .background(with_alpha(palette.background.weakest.color, 0.95)),
275 plot_area: styled_panel(
276 base.plot_area,
277 with_alpha(palette.background.base.color, 0.88),
278 palette.primary.strong.color,
279 10.0,
280 2.0,
281 ),
282 legend: restyled_border(base.legend, palette.primary.strong.color, 10.0, 1.0),
283 controls_panel: restyled_border(
284 base.controls_panel,
285 palette.success.strong.color,
286 10.0,
287 1.0,
288 ),
289 cursor_overlay: restyled_border(
290 base.cursor_overlay,
291 palette.secondary.strong.color,
292 10.0,
293 1.0,
294 ),
295 tooltip: restyled_border(base.tooltip, palette.warning.base.color, 8.0, 1.0),
296 grid: grid_style(
297 with_alpha(palette.primary.strong.color, 0.8),
298 with_alpha(palette.success.base.color, 0.6),
299 with_alpha(palette.secondary.base.color, 0.4),
300 ),
301 tick_label_color: palette.success.strong.color,
302 axis_label_color: palette.primary.strong.color,
303 }
304}
305
306fn style3(theme: &Theme) -> PlotStyle {
307 let palette = theme.extended_palette();

Callers

nothing calls this directly

Calls 5

default_styleFunction · 0.85
styled_panelFunction · 0.85
restyled_borderFunction · 0.85
grid_styleFunction · 0.85
with_alphaFunction · 0.70

Tested by

no test coverage detected