Quick select tool
This commit is contained in:
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user