mirror of https://codeberg.org/topola/topola.git
egui: add default colors for middle layers in 4-layer boards
This commit is contained in:
parent
008dcfeca0
commit
e723c28f26
|
|
@ -20,10 +20,16 @@ impl Layers {
|
||||||
let colors = std::iter::repeat(egui::Color32::from_rgb(255, 255, 255))
|
let colors = std::iter::repeat(egui::Color32::from_rgb(255, 255, 255))
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.map(|(i, color)| {
|
.map(|(i, color)| {
|
||||||
if matches!(board.mesadata().layer_layername(i), Some("F.Cu")) {
|
let layername = board.mesadata().layer_layername(i);
|
||||||
|
|
||||||
|
if matches!(layername, Some("F.Cu")) {
|
||||||
egui::Color32::from_rgb(255, 52, 52)
|
egui::Color32::from_rgb(255, 52, 52)
|
||||||
} else if matches!(board.mesadata().layer_layername(i), Some("B.Cu")) {
|
} else if matches!(layername, Some("B.Cu")) {
|
||||||
egui::Color32::from_rgb(52, 52, 255)
|
egui::Color32::from_rgb(52, 52, 255)
|
||||||
|
} else if matches!(layername, Some("In1.Cu")) {
|
||||||
|
egui::Color32::from_rgb(127, 200, 127)
|
||||||
|
} else if matches!(layername, Some("In2.Cu")) {
|
||||||
|
egui::Color32::from_rgb(206, 125, 44)
|
||||||
} else {
|
} else {
|
||||||
color
|
color
|
||||||
}
|
}
|
||||||
|
|
@ -34,10 +40,16 @@ impl Layers {
|
||||||
let highlight_colors = std::iter::repeat(egui::Color32::from_rgb(255, 255, 255))
|
let highlight_colors = std::iter::repeat(egui::Color32::from_rgb(255, 255, 255))
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.map(|(i, color)| {
|
.map(|(i, color)| {
|
||||||
if matches!(board.mesadata().layer_layername(i), Some("F.Cu")) {
|
let layername = board.mesadata().layer_layername(i);
|
||||||
|
|
||||||
|
if matches!(layername, Some("F.Cu")) {
|
||||||
egui::Color32::from_rgb(255, 100, 100)
|
egui::Color32::from_rgb(255, 100, 100)
|
||||||
} else if matches!(board.mesadata().layer_layername(i), Some("B.Cu")) {
|
} else if matches!(layername, Some("B.Cu")) {
|
||||||
egui::Color32::from_rgb(100, 100, 255)
|
egui::Color32::from_rgb(100, 100, 255)
|
||||||
|
} else if matches!(layername, Some("In1.Cu")) {
|
||||||
|
egui::Color32::from_rgb(213, 236, 213)
|
||||||
|
} else if matches!(layername, Some("In2.Cu")) {
|
||||||
|
egui::Color32::from_rgb(232, 195, 158)
|
||||||
} else {
|
} else {
|
||||||
color
|
color
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue