style: rustfmt the tree so the CI lint check passes

This commit is contained in:
Karim Jerbi committed 2026-10-15 04:10:06 +01:00
1 parent 1317a7b4fd
commit 6025d8be44
128 files changed
+4097 -1676

No files matched your search

+16 -14
View File
@@ -15,7 +15,7 @@ use iced::widget::{
use iced::window;
use iced::{keyboard, Background, Border, Color, Element, Fill, Subscription, Task, Theme};
use iced_aw::ContextMenu;
/// Invisible event surface for accurate point picking. MouseArea emits a
/// positionless press message; capturing the cursor in the actual button
/// event avoids using the previous hover location when clicking quickly.
@@ -1095,10 +1095,11 @@ bg={bg_ms:.1}ms n={view_count}"
let tracking_distance = if tab.dyn_fields.len() == 1
&& tab.dyn_fields[0].component == DynComponent::Distance
{
self.active_distance_ray(self.active_tab).and_then(|(origin, direction)| {
let axis = direction.try_normalize()?;
Some((w - origin).dot(axis).abs())
})
self.active_distance_ray(self.active_tab)
.and_then(|(origin, direction)| {
let axis = direction.try_normalize()?;
Some((w - origin).dot(axis).abs())
})
} else {
None
};
@@ -1254,8 +1255,9 @@ bg={bg_ms:.1}ms n={view_count}"
// The displayed live distance must use the same
// acquired tracking origin as the guide and typed
// distance placement, not the last picked point.
(None, _) if f.component == DynComponent::Distance
&& tracking_distance.is_some() =>
(None, _)
if f.component == DynComponent::Distance
&& tracking_distance.is_some() =>
{
crate::entities::common::format_length(
tracking_distance.unwrap() * f.role.value_scale() as f64,
@@ -4024,7 +4026,9 @@ pub(super) fn recent_files_panel<'a>(
..Default::default()
}
}),
container(text(tip).size(11)).padding([2, 6]).style(container::rounded_box),
container(text(tip).size(11))
.padding([2, 6])
.style(container::rounded_box),
iced::widget::tooltip::Position::Bottom,
)
};
@@ -4061,12 +4065,10 @@ pub(super) fn recent_files_panel<'a>(
.into()
} else if view != RecentView::List {
iced::widget::scrollable(
recent_tiles(recents, thumbs, view == RecentView::Preview).padding(
iced::Padding {
right: 12.0,
..iced::Padding::ZERO
},
),
recent_tiles(recents, thumbs, view == RecentView::Preview).padding(iced::Padding {
right: 12.0,
..iced::Padding::ZERO
}),
)
.width(Fill)
.height(Fill)
+11 -8
View File
@@ -38,7 +38,9 @@ impl OpenCADStudio {
Some(K::ViewBackground) => format!(
"{} — {}",
crate::tr!("view-background", "title"),
self.view_background.as_ref().map_or("", |s| s.view.as_str())
self.view_background
.as_ref()
.map_or("", |s| s.view.as_str())
),
Some(K::ImageAdjust) => crate::tr!("image-adjust", "title"),
Some(K::RefEdit) => crate::tr!("ref-edit", "dialog-title"),
@@ -2185,13 +2187,14 @@ fn autosave_restore_dialog_window(
.size(14)]
.spacing(0);
if let Some(count) = session_drawings {
body = body
.push(iced::widget::Space::new().height(4))
.push(
text(crate::tf!("Session had {count} open drawing(s).", count = count))
.size(12)
.style(dialog_muted_text_style),
);
body = body.push(iced::widget::Space::new().height(4)).push(
text(crate::tf!(
"Session had {count} open drawing(s).",
count = count
))
.size(12)
.style(dialog_muted_text_style),
);
}
body = body
.push(iced::widget::Space::new().height(4))
+8 -8
View File
@@ -1794,14 +1794,14 @@ fn qselect_content<'a>(
iced::widget::pick_list(Some(type_sel), type_options, |value| {
qselect_type_label(value)
})
.on_select(|s: String| {
if s == QSELECT_ANY_TYPE {
Message::QSelectSetType(None)
} else {
Message::QSelectSetType(Some(s))
}
})
.width(field_width),
.on_select(|s: String| {
if s == QSELECT_ANY_TYPE {
Message::QSelectSetType(None)
} else {
Message::QSelectSetType(Some(s))
}
})
.width(field_width),
]
.align_y(iced::Alignment::Center)
.spacing(8)