Files
Graphite/editor/src/document/properties_panel_message.rs
mfish33 5a3500d256 Implement the Properties panel with a transform section for layers (#527)
* initial layout system with tool options

* cargo fmt

* cargo fmt again

* document bar defined on the backend

* cargo fmt

* removed RC<RefCell>

* cargo fmt

* - fix increment behavior
- removed hashmap from layout message handler
- removed no op message from layoutMessage

* cargo fmt

* only send documentBar when zoom or rotation is updated

* ctrl-0 changes zoom properly

* unfinished layer hook in

* fix layerData name

* layer panel options bar

* basic x/y movment

* working transform section

* changed messages from tuples to structs

* hook up text input

* - fixed number input to be more clear
- fixed actions for properties message handler

* Add styling

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-02-12 08:22:57 -08:00

25 lines
615 B
Rust

use crate::message_prelude::*;
use serde::{Deserialize, Serialize};
#[remain::sorted]
#[impl_message(Message, DocumentMessage, PropertiesPanel)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
pub enum PropertiesPanelMessage {
CheckSelectedWasDeleted { path: Vec<LayerId> },
CheckSelectedWasUpdated { path: Vec<LayerId> },
ClearSelection,
ModifyName { name: String },
ModifyTransform { value: f64, transform_op: TransformOp },
SetActiveLayers { paths: Vec<Vec<LayerId>> },
}
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
pub enum TransformOp {
X,
Y,
Width,
Height,
Rotation,
}