1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! SVG rendering helpers with theme-aware colors.
//!
//! Provides utilities for rendering SVG icons with proper
//! theme colors based on hover/active state.
use crateIcon;
use cratetheming;
use ;
/// Render SVG icon centered in a rect with theme-aware colors.
///
/// This enforces square aspect ratio and proper theme colors.
/// The icon color automatically adjusts based on:
/// - Active state (brightest)
/// - Hover state (medium brightness)
/// - Normal state (default icon color)
///
/// # Arguments
///
/// * `ui` - The egui UI context
/// * `icon` - The embedded Icon to render
/// * `rect` - Target rect for the icon
/// * `is_hovered` - Whether the icon is being hovered
/// * `is_active` - Whether the icon is in active/selected state
/// Render SVG icon at a centered position with specified size.
///
/// Convenience wrapper that creates a centered rect from a position.
///
/// # Arguments
///
/// * `ui` - The egui UI context
/// * `icon` - The embedded Icon to render
/// * `center` - Center position for the icon
/// * `size` - Icon size (square)
/// * `is_hovered` - Whether the icon is being hovered
/// * `is_active` - Whether the icon is in active/selected state