Reduce tool code duplication and boilerplate (#993)

* Reduce tool code duplication

* Add doc comments

* Fix Mac key variant, which can't be auto-converted without false positives

* Rename "key" to "keys"

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube
2023-01-28 00:38:52 -08:00
committed by Keavon Chambers
co-authored by Keavon Chambers
parent 78b01b46ec
commit d367b99bef
21 changed files with 480 additions and 1473 deletions
@@ -1,12 +1,14 @@
use crate::messages::layout::utility_types::layout_widget::WidgetCallback;
use graphite_proc_macros::WidgetBuilder;
use derivative::*;
use glam::DVec2;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Derivative, Serialize, Deserialize)]
#[derive(Clone, Default, Derivative, Serialize, Deserialize, WidgetBuilder)]
#[derivative(Debug, PartialEq)]
pub struct PivotAssist {
#[widget_builder(constructor)]
pub position: PivotPosition,
pub disabled: bool,