mirror of https://codeberg.org/topola/topola.git
refactor(egui): rename "layers" to "appearance panel"
This commit is contained in:
parent
c87224e99a
commit
2337576245
|
|
@ -1,6 +1,6 @@
|
||||||
use topola::board::{mesadata::AccessMesadata, Board};
|
use topola::board::{mesadata::AccessMesadata, Board};
|
||||||
|
|
||||||
pub struct Layers {
|
pub struct AppearancePanel {
|
||||||
// TODO:
|
// TODO:
|
||||||
// In1.Cu shall be #7fc87f (#d5ecd5 when selected).
|
// In1.Cu shall be #7fc87f (#d5ecd5 when selected).
|
||||||
// In2.Cu shall be #ce7d2c (#e8c39e when selected).
|
// In2.Cu shall be #ce7d2c (#e8c39e when selected).
|
||||||
|
|
@ -9,7 +9,7 @@ pub struct Layers {
|
||||||
pub highlight_colors: Box<[egui::Color32]>,
|
pub highlight_colors: Box<[egui::Color32]>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Layers {
|
impl AppearancePanel {
|
||||||
pub fn new(board: &Board<impl AccessMesadata>) -> Self {
|
pub fn new(board: &Board<impl AccessMesadata>) -> Self {
|
||||||
let layer_count = board.layout().drawing().layer_count();
|
let layer_count = board.layout().drawing().layer_count();
|
||||||
let visible = std::iter::repeat(true)
|
let visible = std::iter::repeat(true)
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
mod action;
|
mod action;
|
||||||
mod actions;
|
mod actions;
|
||||||
mod app;
|
mod app;
|
||||||
|
mod appearance_panel;
|
||||||
mod config;
|
mod config;
|
||||||
mod error_dialog;
|
mod error_dialog;
|
||||||
mod layers;
|
|
||||||
mod menu_bar;
|
mod menu_bar;
|
||||||
mod overlay;
|
mod overlay;
|
||||||
mod painter;
|
mod painter;
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,14 @@ use topola::{
|
||||||
stepper::Step,
|
stepper::Step,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{error_dialog::ErrorDialog, layers::Layers, overlay::Overlay, translator::Translator};
|
use crate::{
|
||||||
|
error_dialog::ErrorDialog, layers::AppearancePanel, overlay::Overlay, translator::Translator,
|
||||||
|
};
|
||||||
|
|
||||||
/// A loaded design and associated structures
|
/// A loaded design and associated structures
|
||||||
pub struct Workspace {
|
pub struct Workspace {
|
||||||
pub design: SpecctraDesign,
|
pub design: SpecctraDesign,
|
||||||
pub layers: Layers,
|
pub layers: AppearancePanel,
|
||||||
pub overlay: Overlay,
|
pub overlay: Overlay,
|
||||||
pub interactor: Interactor<SpecctraMesadata>,
|
pub interactor: Interactor<SpecctraMesadata>,
|
||||||
|
|
||||||
|
|
@ -32,7 +34,7 @@ pub struct Workspace {
|
||||||
impl Workspace {
|
impl Workspace {
|
||||||
pub fn new(design: SpecctraDesign, tr: &Translator) -> Result<Self, String> {
|
pub fn new(design: SpecctraDesign, tr: &Translator) -> Result<Self, String> {
|
||||||
let board = design.make_board(&mut LayoutEdit::new());
|
let board = design.make_board(&mut LayoutEdit::new());
|
||||||
let layers = Layers::new(&board);
|
let layers = AppearancePanel::new(&board);
|
||||||
let overlay = Overlay::new(&board).map_err(|err| {
|
let overlay = Overlay::new(&board).map_err(|err| {
|
||||||
format!(
|
format!(
|
||||||
"{}; {}",
|
"{}; {}",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue