From f88c2f8327db69175420497f516d5d970aaf2bd1 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Mon, 29 Jun 2026 01:19:05 +0300 Subject: [PATCH] style(ribbon): cargo fmt after PR213 merge PR #213 introduced rustfmt drift in tip_style / swatch indentation and an inline if-expression in two previously fmt-clean files. Format pass only; no behaviour change. Co-Authored-By: Claude Opus 4.8 --- src/ui/ribbon/mod.rs | 8 +++++--- src/ui/ribbon/widgets.rs | 34 +++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/ui/ribbon/mod.rs b/src/ui/ribbon/mod.rs index 28adfa593..cfb71ac01 100644 --- a/src/ui/ribbon/mod.rs +++ b/src/ui/ribbon/mod.rs @@ -871,9 +871,11 @@ impl Ribbon { button( row![ checkmark, - text(name.clone()) - .size(11) - .color(if is_sel { LABEL_ON } else { LABEL_OFF }), + text(name.clone()).size(11).color(if is_sel { + LABEL_ON + } else { + LABEL_OFF + }), ] .spacing(4) .align_y(iced::Center), diff --git a/src/ui/ribbon/widgets.rs b/src/ui/ribbon/widgets.rs index f458ec399..442b5abe7 100644 --- a/src/ui/ribbon/widgets.rs +++ b/src/ui/ribbon/widgets.rs @@ -320,9 +320,9 @@ pub(super) fn make_tip(tip: String) -> Element<'static, Message> { pub(super) fn tip_style(_theme: &Theme) -> container::Style { container::Style { - background: Some(Background::Color(TIP_BG)), - border: Border { - color: COMBO_BORDER, + background: Some(Background::Color(TIP_BG)), + border: Border { + color: COMBO_BORDER, width: 1.0, radius: 3.0.into(), }, @@ -619,14 +619,14 @@ pub(super) fn render_large<'a>( .style(move |_: &Theme| container::Style { background: Some(Background::Color(lc)), border: Border { - color: SWATCH_BORDER, - width: 1.0, - radius: 1.0.into(), - }, - ..Default::default() - }) - .width(12) - .height(12); + color: SWATCH_BORDER, + width: 1.0, + radius: 1.0.into(), + }, + ..Default::default() + }) + .width(12) + .height(12); const ICONS_USED: f32 = 14.0 + 14.0 + 14.0 + 12.0 + 10.0 + 5.0 * 4.0 + 16.0 + 16.0; let name_w = (COMBO_W - ICONS_USED).max(40.0); @@ -798,7 +798,11 @@ pub(super) fn render_large<'a>( border: Border { radius: 2.0.into(), width: 1.0, - color: if is_open { COMBO_ACTIVE_BORDER } else { COMBO_BORDER }, + color: if is_open { + COMBO_ACTIVE_BORDER + } else { + COMBO_BORDER + }, }, ..Default::default() }) @@ -867,7 +871,11 @@ pub(super) fn render_large<'a>( border: Border { radius: 3.0.into(), width: 1.0, - color: if is_open { COMBO_ACTIVE_BORDER } else { COMBO_BORDER }, + color: if is_open { + COMBO_ACTIVE_BORDER + } else { + COMBO_BORDER + }, }, ..Default::default() })