mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 20:58:11 +08:00
Polish and add aborting to several input widgets: no Esc closing parent menus; color picker axis align; repeat on arrow buttons (#2276)
* Remove color input outline; reduce antialiasing compositing artifacts in color widgets * Rename ColorButton to ColorInput * Add features and aborting to several other widgets - Prevent Esc from closing parent floating menus when aborting - Fix missing icon regression - Gutter resizing abort - Color picker aborts, Shift axis alignment, improve click/drag behavior for gradient spectrum - Scrollbar abort, repeat when held, fix directional arrows when viewport is zoomed - Number input abort, repeat when held * Move ColorInput into the inputs folder * Fix tiny logo
This commit is contained in:
@@ -80,7 +80,7 @@ impl LayoutMessageHandler {
|
||||
};
|
||||
responses.add(callback_message);
|
||||
}
|
||||
Widget::ColorButton(color_button) => {
|
||||
Widget::ColorInput(color_button) => {
|
||||
let callback_message = match action {
|
||||
WidgetValueAction::Commit => (color_button.on_commit.callback)(&()),
|
||||
WidgetValueAction::Update => {
|
||||
@@ -99,7 +99,7 @@ impl LayoutMessageHandler {
|
||||
};
|
||||
|
||||
(|| {
|
||||
let update_value = value.as_object().expect("ColorButton update was not of type: object");
|
||||
let update_value = value.as_object().expect("ColorInput update was not of type: object");
|
||||
|
||||
// None
|
||||
let is_none = update_value.get("none").and_then(|x| x.as_bool());
|
||||
@@ -139,7 +139,7 @@ impl LayoutMessageHandler {
|
||||
return (color_button.on_update.callback)(color_button);
|
||||
}
|
||||
|
||||
panic!("ColorButton update was not able to be parsed with color data: {color_button:?}");
|
||||
panic!("ColorInput update was not able to be parsed with color data: {color_button:?}");
|
||||
})()
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user