Add rename template presets and watermark color picker

- Rename step: quick-fill buttons for common patterns (Date+Name,
  EXIF Date+Name, Sequential, Dimensions, Camera+Date, Web-safe)
- Watermark step: color picker in advanced options using ColorDialogButton
- Add watermark_color field to JobConfig, wire through to core
This commit is contained in:
2026-03-06 16:10:05 +02:00
parent 45aaa02f19
commit e976ca2c0a
3 changed files with 80 additions and 2 deletions

View File

@@ -65,6 +65,7 @@ pub struct JobConfig {
pub watermark_position: u32,
pub watermark_opacity: f32,
pub watermark_font_size: f32,
pub watermark_color: [u8; 4],
pub watermark_use_image: bool,
// Rename
pub rename_enabled: bool,
@@ -312,6 +313,7 @@ fn build_ui(app: &adw::Application) {
watermark_position: 8, // BottomRight
watermark_opacity: 0.5,
watermark_font_size: 24.0,
watermark_color: [255, 255, 255, 255],
watermark_use_image: false,
rename_enabled: if remember { sess_state.rename_enabled.unwrap_or(false) } else { false },
rename_prefix: String::new(),
@@ -1495,7 +1497,7 @@ fn run_processing(_window: &adw::ApplicationWindow, ui: &WizardUi) {
position,
font_size: cfg.watermark_font_size,
opacity: cfg.watermark_opacity,
color: [255, 255, 255, 255],
color: cfg.watermark_color,
});
}
}
@@ -2348,7 +2350,7 @@ fn build_preset_from_config(cfg: &JobConfig, name: &str) -> pixstrip_core::prese
position,
font_size: cfg.watermark_font_size,
opacity: cfg.watermark_opacity,
color: [255, 255, 255, 255],
color: cfg.watermark_color,
})
} else {
None