Add format mapping to convert step, orientation controls to resize step

Add per-format mapping rows in convert step advanced options so each
input format can target a different output format. Move basic
orientation controls (rotate/flip) into the resize step per design doc
specification that these should be folded into the resize step.
This commit is contained in:
2026-03-06 13:11:00 +02:00
parent 3ae84297d5
commit ea8444f039
2 changed files with 82 additions and 0 deletions

View File

@@ -153,7 +153,45 @@ pub fn build_convert_page(state: &AppState) -> adw::NavigationPage {
.active(false)
.build();
// Format mapping rows - per input format output selection
let mapping_header = adw::ActionRow::builder()
.title("Per-Format Mapping")
.subtitle("Override the output format for specific input types")
.build();
mapping_header.add_prefix(&gtk::Image::from_icon_name("preferences-system-symbolic"));
let output_choices = ["Same as above", "JPEG", "PNG", "WebP", "AVIF", "Keep Original"];
let jpeg_mapping = adw::ComboRow::builder()
.title("JPEG inputs")
.subtitle("Output format for JPEG source files")
.build();
jpeg_mapping.set_model(Some(&gtk::StringList::new(&output_choices)));
let png_mapping = adw::ComboRow::builder()
.title("PNG inputs")
.subtitle("Output format for PNG source files")
.build();
png_mapping.set_model(Some(&gtk::StringList::new(&output_choices)));
let webp_mapping = adw::ComboRow::builder()
.title("WebP inputs")
.subtitle("Output format for WebP source files")
.build();
webp_mapping.set_model(Some(&gtk::StringList::new(&output_choices)));
let tiff_mapping = adw::ComboRow::builder()
.title("TIFF inputs")
.subtitle("Output format for TIFF source files")
.build();
tiff_mapping.set_model(Some(&gtk::StringList::new(&output_choices)));
advanced_expander.add_row(&progressive_row);
advanced_expander.add_row(&mapping_header);
advanced_expander.add_row(&jpeg_mapping);
advanced_expander.add_row(&png_mapping);
advanced_expander.add_row(&webp_mapping);
advanced_expander.add_row(&tiff_mapping);
advanced_group.add(&advanced_expander);
content.append(&advanced_group);