Enhance rename preview to show 5 files, add watermark advanced expander
Rename step now shows preview for first 5 loaded files (or fallback examples) with incrementing counters instead of a single line. Watermark step gains an advanced expander with rotation, tiling, margin, and scale options alongside the existing opacity control.
This commit is contained in:
@@ -118,7 +118,13 @@ pub fn build_watermark_page(state: &AppState) -> adw::NavigationPage {
|
||||
|
||||
// Advanced options
|
||||
let advanced_group = adw::PreferencesGroup::builder()
|
||||
.title("Advanced")
|
||||
.build();
|
||||
|
||||
let advanced_expander = adw::ExpanderRow::builder()
|
||||
.title("Advanced Options")
|
||||
.subtitle("Opacity, rotation, tiling, margin")
|
||||
.show_enable_switch(false)
|
||||
.build();
|
||||
|
||||
let opacity_row = adw::SpinRow::builder()
|
||||
@@ -128,7 +134,38 @@ pub fn build_watermark_page(state: &AppState) -> adw::NavigationPage {
|
||||
.digits(2)
|
||||
.build();
|
||||
|
||||
advanced_group.add(&opacity_row);
|
||||
let rotation_row = adw::ComboRow::builder()
|
||||
.title("Rotation")
|
||||
.subtitle("Rotate the watermark")
|
||||
.build();
|
||||
let rotation_model = gtk::StringList::new(&["None", "45 degrees", "-45 degrees", "90 degrees"]);
|
||||
rotation_row.set_model(Some(&rotation_model));
|
||||
|
||||
let tiled_row = adw::SwitchRow::builder()
|
||||
.title("Tiled / Repeated")
|
||||
.subtitle("Repeat watermark across the entire image")
|
||||
.active(false)
|
||||
.build();
|
||||
|
||||
let margin_row = adw::SpinRow::builder()
|
||||
.title("Margin from Edges")
|
||||
.subtitle("Padding in pixels from image edges")
|
||||
.adjustment(>k::Adjustment::new(10.0, 0.0, 200.0, 1.0, 10.0, 0.0))
|
||||
.build();
|
||||
|
||||
let scale_row = adw::SpinRow::builder()
|
||||
.title("Scale (% of image)")
|
||||
.subtitle("Watermark size relative to image")
|
||||
.adjustment(>k::Adjustment::new(20.0, 1.0, 100.0, 1.0, 5.0, 0.0))
|
||||
.build();
|
||||
|
||||
advanced_expander.add_row(&opacity_row);
|
||||
advanced_expander.add_row(&rotation_row);
|
||||
advanced_expander.add_row(&tiled_row);
|
||||
advanced_expander.add_row(&margin_row);
|
||||
advanced_expander.add_row(&scale_row);
|
||||
|
||||
advanced_group.add(&advanced_expander);
|
||||
content.append(&advanced_group);
|
||||
|
||||
drop(cfg);
|
||||
|
||||
Reference in New Issue
Block a user