Save As: the type list shows all nine types without scrolling (#2019)

With the two all-slides types the list outgrew the combo box's default
height, and JPEG Pictures, all slides sat behind a scroll.
This commit is contained in:
jgriggs-sluh committed 2026-11-13 08:26:45 -06:00
1 parent 24fadbfc0e
commit 103dc9b05c
2 files changed
+17

No files matched your search

+2
View File
@@ -158,6 +158,8 @@ pub(super) fn save_as(app: &mut SlideApp, ui: &mut Ui, bs: &mut Backstage, out:
ui.horizontal(|ui| {
craft_ui::ComboBox::from_id_salt("backstage_save_type")
.width(340.0)
// Every type in view: at the default height the last ones were behind a scroll.
.height(f32::INFINITY)
.selected_text(current)
.show_ui(ui, |ui| {
for (id, label, _) in SAVE_TYPES {
+15
View File
@@ -392,6 +392,21 @@ fn change_file_type_exports_all_slides_as_pictures() {
let _ = std::fs::remove_dir_all(&dir);
}
/// Save As shows every type in its open list: the last one is picked by a click, not hidden
/// below the list's default height (#2019).
#[test]
fn save_as_type_list_shows_every_type() {
let mut h = harness(new_app());
h.state_mut().run("app.backstage", json!({"page": "saveAs"})).unwrap();
h.run_steps(3);
h.get_by_label("Save as type").click();
h.run_steps(3);
let (last, label, _) = crate::backstage::SAVE_TYPES[crate::backstage::SAVE_TYPES.len() - 1];
h.get_by_label(label).click();
h.run_steps(3);
assert_eq!(h.state().backstage.as_ref().map(|b| b.file_type), Some(last));
}
/// Close closes a saved presentation at once and asks about unsaved changes first.
#[test]
fn close_closes_and_asks_about_unsaved_changes() {