mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-06 07:18:13 +08:00
Add support for clicking checkboxes via their labels (#2667)
This commit is contained in:
+3
-1
@@ -77,11 +77,13 @@ impl LayoutHolder for NewDocumentDialogMessageHandler {
|
||||
.widget_holder(),
|
||||
];
|
||||
|
||||
let mut checkbox_id = CheckboxId::default();
|
||||
let infinite = vec![
|
||||
TextLabel::new("Infinite Canvas").table_align(true).min_width(90).widget_holder(),
|
||||
TextLabel::new("Infinite Canvas").table_align(true).min_width(90).for_checkbox(&mut checkbox_id).widget_holder(),
|
||||
Separator::new(SeparatorType::Unrelated).widget_holder(),
|
||||
CheckboxInput::new(self.infinite)
|
||||
.on_update(|checkbox_input: &CheckboxInput| NewDocumentDialogMessage::Infinite(checkbox_input.checked).into())
|
||||
.for_label(checkbox_id.clone())
|
||||
.widget_holder(),
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user