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};
|
||||
|
||||
pub struct Layers {
|
||||
pub struct AppearancePanel {
|
||||
// TODO:
|
||||
// In1.Cu shall be #7fc87f (#d5ecd5 when selected).
|
||||
// In2.Cu shall be #ce7d2c (#e8c39e when selected).
|
||||
|
|
@ -9,7 +9,7 @@ pub struct Layers {
|
|||
pub highlight_colors: Box<[egui::Color32]>,
|
||||
}
|
||||
|
||||
impl Layers {
|
||||
impl AppearancePanel {
|
||||
pub fn new(board: &Board<impl AccessMesadata>) -> Self {
|
||||
let layer_count = board.layout().drawing().layer_count();
|
||||
let visible = std::iter::repeat(true)
|
||||
|
|
@ -3,9 +3,9 @@
|
|||
mod action;
|
||||
mod actions;
|
||||
mod app;
|
||||
mod appearance_panel;
|
||||
mod config;
|
||||
mod error_dialog;
|
||||
mod layers;
|
||||
mod menu_bar;
|
||||
mod overlay;
|
||||
mod painter;
|
||||
|
|
|
|||
|
|
@ -14,12 +14,14 @@ use topola::{
|
|||
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
|
||||
pub struct Workspace {
|
||||
pub design: SpecctraDesign,
|
||||
pub layers: Layers,
|
||||
pub layers: AppearancePanel,
|
||||
pub overlay: Overlay,
|
||||
pub interactor: Interactor<SpecctraMesadata>,
|
||||
|
||||
|
|
@ -32,7 +34,7 @@ pub struct Workspace {
|
|||
impl Workspace {
|
||||
pub fn new(design: SpecctraDesign, tr: &Translator) -> Result<Self, String> {
|
||||
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| {
|
||||
format!(
|
||||
"{}; {}",
|
||||
|
|
|
|||
Loading…
Reference in New Issue