Wire DPI setting from resize step through to processing job
Add output_dpi field to JobConfig, ProcessingJob, and Preset. Connect the DPI SpinRow in the resize step's advanced options to update the config value.
This commit is contained in:
@@ -19,6 +19,7 @@ pub struct JobConfig {
|
||||
pub resize_height: u32,
|
||||
pub allow_upscale: bool,
|
||||
pub resize_algorithm: u32,
|
||||
pub output_dpi: u32,
|
||||
// Adjustments
|
||||
pub adjustments_enabled: bool,
|
||||
pub rotation: u32,
|
||||
@@ -226,6 +227,7 @@ fn build_ui(app: &adw::Application) {
|
||||
resize_height: if remember { sess_state.resize_height.unwrap_or(0) } else { 0 },
|
||||
allow_upscale: false,
|
||||
resize_algorithm: 0,
|
||||
output_dpi: 72,
|
||||
adjustments_enabled: false,
|
||||
rotation: 0,
|
||||
flip: 0,
|
||||
@@ -1454,6 +1456,7 @@ fn run_processing(_window: &adw::ApplicationWindow, ui: &WizardUi) {
|
||||
}
|
||||
|
||||
job.preserve_directory_structure = cfg.preserve_dir_structure;
|
||||
job.output_dpi = cfg.output_dpi;
|
||||
job.overwrite_behavior = match cfg.overwrite_behavior {
|
||||
1 => pixstrip_core::operations::OverwriteBehavior::AutoRename,
|
||||
2 => pixstrip_core::operations::OverwriteBehavior::Overwrite,
|
||||
|
||||
Reference in New Issue
Block a user