Add visual format cards, per-image remove, shortcuts dialog, wire threads

This commit is contained in:
2026-03-06 12:58:43 +02:00
parent 0eebeabd42
commit fde0fbdf9f
4 changed files with 207 additions and 58 deletions

View File

@@ -89,6 +89,13 @@ pub fn build_settings_dialog() -> adw::PreferencesDialog {
.build();
let threads_model = gtk::StringList::new(&["Auto", "1", "2", "4", "8"]);
threads_row.set_model(Some(&threads_model));
threads_row.set_selected(match config.thread_count {
pixstrip_core::config::ThreadCount::Auto => 0,
pixstrip_core::config::ThreadCount::Manual(1) => 1,
pixstrip_core::config::ThreadCount::Manual(2) => 2,
pixstrip_core::config::ThreadCount::Manual(n) if n <= 4 => 3,
pixstrip_core::config::ThreadCount::Manual(_) => 4,
});
let error_row = adw::ComboRow::builder()
.title("On error")
@@ -192,7 +199,13 @@ pub fn build_settings_dialog() -> adw::PreferencesDialog {
1 => SkillLevel::Detailed,
_ => SkillLevel::Simple,
},
thread_count: pixstrip_core::config::ThreadCount::Auto,
thread_count: match threads_row.selected() {
1 => pixstrip_core::config::ThreadCount::Manual(1),
2 => pixstrip_core::config::ThreadCount::Manual(2),
3 => pixstrip_core::config::ThreadCount::Manual(4),
4 => pixstrip_core::config::ThreadCount::Manual(8),
_ => pixstrip_core::config::ThreadCount::Auto,
},
error_behavior: match error_row.selected() {
1 => ErrorBehavior::PauseOnError,
_ => ErrorBehavior::SkipAndContinue,