chore: source formatting and spec allignment

This commit is contained in:
2026-07-18 14:20:23 +02:00
parent a594b99e90
commit 16a210c0ad
119 changed files with 8868 additions and 5250 deletions

View File

@@ -1,5 +1,5 @@
use iced::widget::{button, checkbox, column, container, pick_list, row, text, text_input, Space};
use iced::widget::text::Shaping;
use iced::widget::{Space, button, checkbox, column, container, pick_list, row, text, text_input};
use iced::{Alignment, Background, Color, Element, Length, Theme};
/// Standard form field label color.
@@ -19,7 +19,10 @@ pub fn labeled_input<'a, Message: Clone + 'a>(
on_change: impl Fn(String) -> Message + 'a,
) -> Element<'a, Message> {
column![
text(label.to_string()).size(12).color(LABEL_COLOR).shaping(Shaping::Advanced),
text(label.to_string())
.size(12)
.color(LABEL_COLOR)
.shaping(Shaping::Advanced),
text_input(placeholder, value).on_input(on_change).size(14),
]
.spacing(4)
@@ -39,7 +42,10 @@ where
{
let list: Vec<T> = options.to_vec();
column![
text(label.to_string()).size(12).color(LABEL_COLOR).shaping(Shaping::Advanced),
text(label.to_string())
.size(12)
.color(LABEL_COLOR)
.shaping(Shaping::Advanced),
pick_list(list, selected.cloned(), on_select),
]
.spacing(4)
@@ -157,8 +163,14 @@ pub fn toolbar<'a, Message: 'a>(
pub fn date_label<'a, Message: 'a>(label: &str, timestamp_ms: i64) -> Element<'a, Message> {
let date_str = format_timestamp(timestamp_ms);
row![
text(label.to_string()).size(12).color(LABEL_COLOR).shaping(Shaping::Advanced),
text(date_str).size(12).color(Color::from_rgb(0.55, 0.58, 0.65)).shaping(Shaping::Advanced),
text(label.to_string())
.size(12)
.color(LABEL_COLOR)
.shaping(Shaping::Advanced),
text(date_str)
.size(12)
.color(Color::from_rgb(0.55, 0.58, 0.65))
.shaping(Shaping::Advanced),
]
.spacing(8)
.into()

View File

@@ -3,11 +3,11 @@ use std::collections::HashMap;
use std::rc::Rc;
use std::sync::atomic::{AtomicU64, Ordering};
use iced::event;
use iced::advanced::layout::{self, Node};
use iced::advanced::renderer;
use iced::advanced::widget::Tree;
use iced::advanced::{Clipboard, Layout, Shell, Widget};
use iced::event;
use iced::mouse;
use iced::{Element, Event, Length, Rectangle, Size, Task, window};
use wry::dpi::{LogicalPosition, LogicalSize};
@@ -314,4 +314,4 @@ where
pub fn webview<Message>(controller: &WebViewController) -> WebViewPlaceholder<Message> {
WebViewPlaceholder::new().bounds_sender(controller.bounds_sender())
}
}