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 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-06-29 01:19:05 +03:00
commit f88c2f8327
2 changed files with 26 additions and 16 deletions

View file

@ -871,9 +871,11 @@ impl Ribbon {
button( button(
row![ row![
checkmark, checkmark,
text(name.clone()) text(name.clone()).size(11).color(if is_sel {
.size(11) LABEL_ON
.color(if is_sel { LABEL_ON } else { LABEL_OFF }), } else {
LABEL_OFF
}),
] ]
.spacing(4) .spacing(4)
.align_y(iced::Center), .align_y(iced::Center),

View file

@ -320,9 +320,9 @@ pub(super) fn make_tip(tip: String) -> Element<'static, Message> {
pub(super) fn tip_style(_theme: &Theme) -> container::Style { pub(super) fn tip_style(_theme: &Theme) -> container::Style {
container::Style { container::Style {
background: Some(Background::Color(TIP_BG)), background: Some(Background::Color(TIP_BG)),
border: Border { border: Border {
color: COMBO_BORDER, color: COMBO_BORDER,
width: 1.0, width: 1.0,
radius: 3.0.into(), radius: 3.0.into(),
}, },
@ -619,14 +619,14 @@ pub(super) fn render_large<'a>(
.style(move |_: &Theme| container::Style { .style(move |_: &Theme| container::Style {
background: Some(Background::Color(lc)), background: Some(Background::Color(lc)),
border: Border { border: Border {
color: SWATCH_BORDER, color: SWATCH_BORDER,
width: 1.0, width: 1.0,
radius: 1.0.into(), radius: 1.0.into(),
}, },
..Default::default() ..Default::default()
}) })
.width(12) .width(12)
.height(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; 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); let name_w = (COMBO_W - ICONS_USED).max(40.0);
@ -798,7 +798,11 @@ pub(super) fn render_large<'a>(
border: Border { border: Border {
radius: 2.0.into(), radius: 2.0.into(),
width: 1.0, 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() ..Default::default()
}) })
@ -867,7 +871,11 @@ pub(super) fn render_large<'a>(
border: Border { border: Border {
radius: 3.0.into(), radius: 3.0.into(),
width: 1.0, 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() ..Default::default()
}) })