Fix sizing labels and clippy type complexity

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas 2026-10-09 13:52:50 -04:00
parent ae30f9ef21
commit 3e993df4d1
2 changed files with 5 additions and 2 deletions

View File

@ -72,7 +72,10 @@ fn screen_to_unit(app: &FigApp, id: NodeId, s: Pos2) -> Option<(f64, f64)> {
}
/// Auto layout zones of a single selected AL frame, in screen space: padding bands and gaps.
fn al_zones(app: &FigApp) -> Option<(NodeId, Vec<(usize, Rect, f64)>, Vec<Rect>, f64, bool)> {
/// (frame, padding bands (side, rect, value), gap rects, gap, vertical)
type Zones = (NodeId, Vec<(usize, Rect, f64)>, Vec<Rect>, f64, bool);
fn al_zones(app: &FigApp) -> Option<Zones> {
let ds = app.session.ds().ok()?;
if ds.selection.len() != 1 || ds.text_edit.is_some() || ds.vector_edit.is_some() {
return None;

View File

@ -511,7 +511,7 @@ fn layout(app: &mut FigApp, ui: &mut Ui, doc: &Document, sel: &[NodeId]) {
let label = cur.map(|s| s.label()).unwrap_or("Mixed");
let resp = widgets::dropdown(
ui,
&format!("{label} {}", if axis == "W" { "width" } else { "height" }),
label,
half,
Some(match cur {
Some(Sizing::Hug) => Icon::Hug,