cargo fmt
This commit is contained in:
parent
468cbde5e1
commit
ca07268c7c
204 changed files with 13988 additions and 5516 deletions
|
|
@ -12,15 +12,15 @@ use crate::app::Message;
|
|||
/// vp_scale = custom_scale value on the Viewport entity (0.02 for "1:50")
|
||||
const COMMON_SCALES: &[(&str, f32, f64)] = &[
|
||||
("1:100", 100.0, 0.01),
|
||||
("1:50", 50.0, 0.02),
|
||||
("1:20", 20.0, 0.05),
|
||||
("1:10", 10.0, 0.10),
|
||||
("1:5", 5.0, 0.20),
|
||||
("1:2", 2.0, 0.50),
|
||||
("1:1", 1.0, 1.00),
|
||||
("2:1", 0.5, 2.00),
|
||||
("5:1", 0.2, 5.00),
|
||||
("10:1", 0.1, 10.00),
|
||||
("1:50", 50.0, 0.02),
|
||||
("1:20", 20.0, 0.05),
|
||||
("1:10", 10.0, 0.10),
|
||||
("1:5", 5.0, 0.20),
|
||||
("1:2", 2.0, 0.50),
|
||||
("1:1", 1.0, 1.00),
|
||||
("2:1", 0.5, 2.00),
|
||||
("5:1", 0.2, 5.00),
|
||||
("10:1", 0.1, 10.00),
|
||||
];
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
|
@ -93,7 +93,11 @@ pub fn scale_popup_overlay(
|
|||
fn scale_row(label: &'static str, active: bool, msg: Message) -> Element<'static, Message> {
|
||||
let check = text(if active { "✓" } else { " " })
|
||||
.size(11)
|
||||
.color(if active { CHECK_COLOR } else { Color::TRANSPARENT })
|
||||
.color(if active {
|
||||
CHECK_COLOR
|
||||
} else {
|
||||
Color::TRANSPARENT
|
||||
})
|
||||
.width(Length::Fixed(14.0));
|
||||
|
||||
let lbl = text(label)
|
||||
|
|
@ -118,9 +122,39 @@ fn scale_row(label: &'static str, active: bool, msg: Message) -> Element<'static
|
|||
|
||||
// ── Colours ───────────────────────────────────────────────────────────────
|
||||
|
||||
const PANEL_BG: Color = Color { r: 0.15, g: 0.15, b: 0.15, a: 1.0 };
|
||||
const PANEL_BORDER: Color = Color { r: 0.32, g: 0.32, b: 0.32, a: 1.0 };
|
||||
const ROW_HOVER: Color = Color { r: 0.22, g: 0.22, b: 0.22, a: 1.0 };
|
||||
const CHECK_COLOR: Color = Color { r: 0.35, g: 0.75, b: 1.00, a: 1.0 };
|
||||
const LABEL_ON: Color = Color { r: 0.92, g: 0.92, b: 0.92, a: 1.0 };
|
||||
const LABEL_OFF: Color = Color { r: 0.65, g: 0.65, b: 0.65, a: 1.0 };
|
||||
const PANEL_BG: Color = Color {
|
||||
r: 0.15,
|
||||
g: 0.15,
|
||||
b: 0.15,
|
||||
a: 1.0,
|
||||
};
|
||||
const PANEL_BORDER: Color = Color {
|
||||
r: 0.32,
|
||||
g: 0.32,
|
||||
b: 0.32,
|
||||
a: 1.0,
|
||||
};
|
||||
const ROW_HOVER: Color = Color {
|
||||
r: 0.22,
|
||||
g: 0.22,
|
||||
b: 0.22,
|
||||
a: 1.0,
|
||||
};
|
||||
const CHECK_COLOR: Color = Color {
|
||||
r: 0.35,
|
||||
g: 0.75,
|
||||
b: 1.00,
|
||||
a: 1.0,
|
||||
};
|
||||
const LABEL_ON: Color = Color {
|
||||
r: 0.92,
|
||||
g: 0.92,
|
||||
b: 0.92,
|
||||
a: 1.0,
|
||||
};
|
||||
const LABEL_OFF: Color = Color {
|
||||
r: 0.65,
|
||||
g: 0.65,
|
||||
b: 0.65,
|
||||
a: 1.0,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue