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:
@@ -224,6 +224,38 @@ pub fn build_resize_page(state: &AppState) -> adw::NavigationPage {
|
||||
|
||||
content.append(&mode_stack);
|
||||
|
||||
// Basic orientation adjustments (folded into resize step per design doc)
|
||||
let orientation_group = adw::PreferencesGroup::builder()
|
||||
.title("Orientation")
|
||||
.description("Rotate and flip applied before resize")
|
||||
.build();
|
||||
|
||||
let rotate_row = adw::ComboRow::builder()
|
||||
.title("Rotate")
|
||||
.subtitle("Rotation applied to all images")
|
||||
.build();
|
||||
let rotate_model = gtk::StringList::new(&[
|
||||
"None",
|
||||
"90 clockwise",
|
||||
"180",
|
||||
"270 clockwise",
|
||||
"Auto-orient (from EXIF)",
|
||||
]);
|
||||
rotate_row.set_model(Some(&rotate_model));
|
||||
rotate_row.set_selected(cfg.rotation);
|
||||
|
||||
let flip_row = adw::ComboRow::builder()
|
||||
.title("Flip")
|
||||
.subtitle("Mirror the image")
|
||||
.build();
|
||||
let flip_model = gtk::StringList::new(&["None", "Horizontal", "Vertical"]);
|
||||
flip_row.set_model(Some(&flip_model));
|
||||
flip_row.set_selected(cfg.flip);
|
||||
|
||||
orientation_group.add(&rotate_row);
|
||||
orientation_group.add(&flip_row);
|
||||
content.append(&orientation_group);
|
||||
|
||||
// Advanced options (AdwExpanderRow per design doc)
|
||||
let advanced_group = adw::PreferencesGroup::builder()
|
||||
.title("Advanced")
|
||||
@@ -292,6 +324,18 @@ pub fn build_resize_page(state: &AppState) -> adw::NavigationPage {
|
||||
jc.borrow_mut().allow_upscale = row.is_active();
|
||||
});
|
||||
}
|
||||
{
|
||||
let jc = state.job_config.clone();
|
||||
rotate_row.connect_selected_notify(move |row| {
|
||||
jc.borrow_mut().rotation = row.selected();
|
||||
});
|
||||
}
|
||||
{
|
||||
let jc = state.job_config.clone();
|
||||
flip_row.connect_selected_notify(move |row| {
|
||||
jc.borrow_mut().flip = row.selected();
|
||||
});
|
||||
}
|
||||
|
||||
scrolled.set_child(Some(&content));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user