Quick select tool

This commit is contained in:
Skyler Lehmkuhl
2026-03-07 05:30:51 -05:00
parent 1900792fa9
commit 354b96f142
3 changed files with 280 additions and 19 deletions
@@ -184,7 +184,7 @@ impl InfopanelPane {
let has_options = is_vector_tool || is_raster_paint_tool || is_raster_transform || matches!(
tool,
Tool::PaintBucket | Tool::RegionSelect | Tool::MagicWand
Tool::PaintBucket | Tool::RegionSelect | Tool::MagicWand | Tool::QuickSelect
);
if !has_options {
@@ -354,6 +354,43 @@ impl InfopanelPane {
ui.checkbox(&mut shared.raster_settings.wand_contiguous, "Contiguous");
}
Tool::QuickSelect => {
use crate::tools::FillThresholdMode;
ui.horizontal(|ui| {
ui.label("Radius:");
ui.add(
egui::Slider::new(
&mut shared.raster_settings.quick_select_radius,
1.0_f32..=200.0,
)
.step_by(1.0),
);
});
ui.horizontal(|ui| {
ui.label("Threshold:");
ui.add(
egui::Slider::new(
&mut shared.raster_settings.wand_threshold,
0.0_f32..=255.0,
)
.step_by(1.0),
);
});
ui.horizontal(|ui| {
ui.label("Mode:");
ui.selectable_value(
&mut shared.raster_settings.wand_mode,
FillThresholdMode::Absolute,
"Absolute",
);
ui.selectable_value(
&mut shared.raster_settings.wand_mode,
FillThresholdMode::Relative,
"Relative",
);
});
}
Tool::Polygon => {
// Number of sides
ui.horizontal(|ui| {