forked from 1b-agent/opencadstudio-upstream
style: apply cargo fmt across workspace
This commit is contained in:
1 parent
85710e5454
commit
9cf9ff2c5c
531 files changed
+57740
-33906
No files matched your search
@@ -1,7 +1,7 @@
|
||||
//! Bottom status bar — Model/Layout tabs + OSNAP toggle + status info
|
||||
|
||||
pub mod status_menu;
|
||||
pub(crate) mod spacemouse;
|
||||
pub mod status_menu;
|
||||
pub mod statusbar_config;
|
||||
pub mod statusbar_menu;
|
||||
|
||||
@@ -575,8 +575,7 @@ impl StatusBar {
|
||||
if show_layout_tabs {
|
||||
// Paper layouts only: `layouts[0]` is always "Model". Derived once
|
||||
// from the shared `Arc` and cloned (cheap refcount bump) per tab.
|
||||
let reorderable_layouts: Arc<[String]> =
|
||||
Arc::from(layouts.get(1..).unwrap_or(&[]));
|
||||
let reorderable_layouts: Arc<[String]> = Arc::from(layouts.get(1..).unwrap_or(&[]));
|
||||
// Shared once per frame: block tabs carry no reorder set, so reuse
|
||||
// one empty Arc (refcount bump) instead of allocating per tab.
|
||||
let empty_reorderable: Arc<[String]> = Arc::from([] as [String; 0]);
|
||||
|
||||
@@ -47,8 +47,8 @@ pub fn menu_bar<'a>(
|
||||
// therefore made the pointer vanish. `mouse_area` only fills in
|
||||
// where the content stays silent, so an enabled row keeps its own
|
||||
// pointer. (#684)
|
||||
let content = iced::widget::mouse_area(entry.content)
|
||||
.interaction(iced::mouse::Interaction::Idle);
|
||||
let content =
|
||||
iced::widget::mouse_area(entry.content).interaction(iced::mouse::Interaction::Idle);
|
||||
Item::new(content).close_on_click(entry.close_on_click)
|
||||
})
|
||||
.collect();
|
||||
|
||||
@@ -114,7 +114,6 @@ impl StatusPill {
|
||||
StatusPill::CleanScreen => "Clean Screen",
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// Tracks which pills the user has hidden. Serialized as the "statusbar" section
|
||||
|
||||
@@ -4,9 +4,9 @@ use iced::widget::{button, row, text};
|
||||
use iced::{Background, Element, Fill, Theme};
|
||||
|
||||
use crate::app::Message;
|
||||
use crate::ui::statusbar::statusbar_config::{StatusBarConfig, StatusPill};
|
||||
use crate::ui::statusbar::status_menu::Entry;
|
||||
use crate::t;
|
||||
use crate::ui::statusbar::status_menu::Entry;
|
||||
use crate::ui::statusbar::statusbar_config::{StatusBarConfig, StatusPill};
|
||||
|
||||
pub fn customization_entries(config: &StatusBarConfig) -> Vec<Entry<'static>> {
|
||||
StatusPill::ALL
|
||||
@@ -21,10 +21,7 @@ pub fn customization_entries(config: &StatusBarConfig) -> Vec<Entry<'static>> {
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn layout_entries<'a>(
|
||||
layouts: &[String],
|
||||
current: &str,
|
||||
) -> Vec<Entry<'a>> {
|
||||
pub fn layout_entries<'a>(layouts: &[String], current: &str) -> Vec<Entry<'a>> {
|
||||
layouts
|
||||
.iter()
|
||||
.map(|name| Entry::close(layout_row(name.clone(), name == current)))
|
||||
@@ -49,7 +46,11 @@ fn layout_row<'a>(name: String, is_current: bool) -> Element<'a, Message> {
|
||||
.into()
|
||||
}
|
||||
|
||||
fn menu_row(label: std::borrow::Cow<'static, str>, checked: bool, msg: Message) -> Element<'static, Message> {
|
||||
fn menu_row(
|
||||
label: std::borrow::Cow<'static, str>,
|
||||
checked: bool,
|
||||
msg: Message,
|
||||
) -> Element<'static, Message> {
|
||||
let check = crate::ui::icons::themed_check_cell(checked);
|
||||
|
||||
let lbl = text(label).size(11);
|
||||
|
||||
Reference in new issue
Block a user