From a504823515fb1d23baff0595d58edf2a843172cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sat, 28 Nov 2026 02:37:54 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20style:=20mic/speaker=20cards=20n?= =?UTF-8?q?arrower;=20wordmark=20morph:=20h=20shrinks=20and=20slides=20und?= =?UTF-8?q?er=20the=20s=20into=20its=20cedilla=20while=20=C5=9F=20fades=20?= =?UTF-8?q?in,=20reversed=20back=20to=20sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/gui/parts.rs | 4 +-- crates/client/src/gui/share_view.rs | 1 + crates/client/src/gui/sidebar.rs | 52 ++++++++++++++++++++++++----- 3 files changed, 47 insertions(+), 10 deletions(-) diff --git a/crates/client/src/gui/parts.rs b/crates/client/src/gui/parts.rs index a55de7c..11de514 100644 --- a/crates/client/src/gui/parts.rs +++ b/crates/client/src/gui/parts.rs @@ -324,7 +324,7 @@ pub fn popover(t: Tokens) -> Div { } pub fn quick(t: Tokens) -> Div { - popover(t).w(px(size::SHEET)).gap(px(space::SM)) + popover(t).w(px(size::POPOVER)).gap(px(space::SM)) } pub fn quick_row(label: &'static str, control: impl IntoElement, t: Tokens) -> Div { @@ -332,7 +332,7 @@ pub fn quick_row(label: &'static str, control: impl IntoElement, t: Tokens) -> D .min_h(px(size::CONTROL)) .child( words(label, Text::Label, Ink::Faint, t) - .w(px(size::ROW + space::XL)) + .w(px(size::ROW + space::SM)) .flex_none(), ) .child(div().flex_1().min_w_0().child(control)) diff --git a/crates/client/src/gui/share_view.rs b/crates/client/src/gui/share_view.rs index 4c42129..290aadb 100644 --- a/crates/client/src/gui/share_view.rs +++ b/crates/client/src/gui/share_view.rs @@ -888,6 +888,7 @@ fn settings_card(entity: &Entity, yumush: &Yumush, palette: Palette) -> let t = palette.tokens; super::parts::quick(t) + .w(px(size::SHEET)) .child(super::parts::quick_row( "Resolution", segmented( diff --git a/crates/client/src/gui/sidebar.rs b/crates/client/src/gui/sidebar.rs index 414aba4..1900887 100644 --- a/crates/client/src/gui/sidebar.rs +++ b/crates/client/src/gui/sidebar.rs @@ -1318,17 +1318,53 @@ enum Doing { Offline, } +const S_WIDTH: f32 = 0.5; +const CEDILLA_DROP: f32 = 0.45; +const H_SHRINK: f32 = 0.6; +const MORPH: std::time::Duration = std::time::Duration::from_millis(420); + fn wordmark_tail(flips: u32) -> AnyElement { - let tail = div() - .relative() - .child(if flips % 2 == 1 { "ş" } else { "sh" }); + let em = super::style::text::TITLE / super::style::text::UI; + let turkish = flips % 2 == 1; + let progress = move |delta: f32| if turkish { delta } else { 1. - delta }; + let s = move |p: f32| div().opacity(1. - p).child("s"); + let cedilla = move |p: f32| div().absolute().top_0().left_0().opacity(p).child("ş"); + let h = move |p: f32| { + div() + .absolute() + .top(gpui_kit::rems(p * CEDILLA_DROP * em)) + .left(gpui_kit::rems(S_WIDTH * em * (1. - p))) + .text_size(gpui_kit::rems(em * (1. - H_SHRINK * p))) + .opacity(1. - p) + .child("h") + }; + let tail = div().relative(); if flips == 0 { - return tail.into_any_element(); + return tail + .child(s(0.)) + .child(cedilla(0.)) + .child(h(0.)) + .into_any_element(); } - tail.with_animation( - ("wordmark", flips), - super::parts::motion(), - |tail, delta| tail.opacity(delta).top(px((1. - delta) * -space::SM)), + let animation = || gpui_kit::Animation::new(MORPH).with_easing(gpui_kit::ease_in_out); + tail.child( + s(0.).with_animation(("wordmark_s", flips), animation(), move |el, delta| { + el.opacity(1. - progress(delta)) + }), + ) + .child(cedilla(0.).with_animation( + ("wordmark_cedilla", flips), + animation(), + move |el, delta| el.opacity(progress(delta)), + )) + .child( + h(0.).with_animation(("wordmark_h", flips), animation(), move |el, delta| { + let p = progress(delta); + el.top(gpui_kit::rems(p * CEDILLA_DROP * em)) + .left(gpui_kit::rems(S_WIDTH * em * (1. - p))) + .text_size(gpui_kit::rems(em * (1. - H_SHRINK * p))) + .opacity(1. - p) + }), ) .into_any_element() }