mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 01:18:11 +08:00
Add properties panel entries for artboards (#572)
* Artboards can have properties * fix crash when renaming artboards * moved target document to utility types * moved import and added test for file version information * fixed missing import * fix error from merging * - typed properties message handler data - removed name from WidgetRow * clippy warnings * artboards have seperate properties section * - color input can be forced to have selection - crop tool shows on switch - select tool shows on switch * variable renamed * change to use PropType<boolean> instead of PropType<Boolean> * Add an artboard icon * Add the "Delete Artboard" hint * fix unselect glitch * even better * Remove the Transform properties group Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
ca28bc3947
commit
916a575446
@@ -52,7 +52,7 @@ pub type SubLayout = Vec<LayoutRow>;
|
||||
#[remain::sorted]
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub enum LayoutRow {
|
||||
Row { name: String, widgets: Vec<WidgetHolder> },
|
||||
Row { widgets: Vec<WidgetHolder> },
|
||||
Section { name: String, layout: SubLayout },
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ impl<'a> Iterator for WidgetIter<'a> {
|
||||
}
|
||||
|
||||
match self.stack.pop() {
|
||||
Some(LayoutRow::Row { name: _, widgets }) => {
|
||||
Some(LayoutRow::Row { widgets }) => {
|
||||
self.current_slice = Some(widgets);
|
||||
self.next()
|
||||
}
|
||||
@@ -103,7 +103,7 @@ impl<'a> Iterator for WidgetIterMut<'a> {
|
||||
};
|
||||
|
||||
match self.stack.pop() {
|
||||
Some(LayoutRow::Row { name: _, widgets }) => {
|
||||
Some(LayoutRow::Row { widgets }) => {
|
||||
self.current_slice = Some(widgets);
|
||||
self.next()
|
||||
}
|
||||
@@ -207,6 +207,9 @@ pub struct ColorInput {
|
||||
#[serde(skip)]
|
||||
#[derivative(Debug = "ignore", PartialEq = "ignore")]
|
||||
pub on_update: WidgetCallback<ColorInput>,
|
||||
#[serde(rename = "canSetTransparent")]
|
||||
#[derivative(Default(value = "true"))]
|
||||
pub can_set_transparent: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize, Debug, PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user