mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-18 04:57:05 +00:00
Fit the landed changes together
This commit is contained in:
@@ -350,7 +350,9 @@ pub(crate) fn write_value(doc: &mut Document, f: &Field, value: &FieldValue, scr
|
||||
}
|
||||
}
|
||||
FieldValue::Radio(None) => None,
|
||||
FieldValue::Choice(_) | FieldValue::ChoiceIndices(_) | FieldValue::Widget(_) => return invalid(format!("{:?} is a check box: use true or false", f.name)),
|
||||
FieldValue::Choice(_) | FieldValue::ChoiceIndices(_) | FieldValue::Widget(_) => {
|
||||
return invalid(format!("{:?} is a check box: use true or false", f.name));
|
||||
}
|
||||
};
|
||||
set_states(doc, f, state.as_deref(), None)
|
||||
}
|
||||
|
||||
@@ -51,6 +51,8 @@ fn field(name: &str, page: usize, rect: [f64; 4]) -> FormField {
|
||||
flags: 0,
|
||||
max_len: None,
|
||||
options: Vec::new(),
|
||||
selected: Vec::new(),
|
||||
single_value_is_array: false,
|
||||
da: String::new(),
|
||||
quadding: 0,
|
||||
tooltip: None,
|
||||
|
||||
@@ -3570,7 +3570,7 @@ fn the_selection_bar_stays_inside_the_pages_area() {
|
||||
h.run_steps(4);
|
||||
let viewport = h.state().views[0].viewport_rect();
|
||||
// The bar's whole area, frame included, not only its first and last buttons.
|
||||
let id = egui::Id::unique(("text-selection-actions", h.state().views[0].id.0));
|
||||
let id = egui::Id::unique(("text-selection-actions", h.state().views[0].view_key()));
|
||||
let bar = h.ctx.memory(|m| m.area_rect(id)).expect("the selection bar is shown");
|
||||
// The bar opens at the selection's left edge: past the area's right edge, without the clamp.
|
||||
let anchor = h.state().views[0].glyph_screen_rect(0, last).unwrap().left();
|
||||
|
||||
Reference in New Issue
Block a user