T16 Finance: market charts with kinds, volume, profile, studies, drawings, compare, alerts and sync (T16a–b); quotes, book, tape and DOM (T16c); order entry, blotter, risk, options and payoff (T16d); markets, calendars, portfolio and wallet (T16e); typography::Ellipsis ends lines that gpui's truncate clipped; chart notes stack and ticks label round values

This commit is contained in:
ZacharyZhang-NY committed 2026-09-25 23:30:04 -04:00
1 parent efde9d64b0
commit 8d43b7a880
76 files changed
+10311 -173

No files matched your search

+9 -1
View File
@@ -105,6 +105,7 @@ impl RenderOnce for Blink {
pub struct Flash<K: Clone + PartialEq + 'static> {
id: ElementId,
key: K,
tint: Option<Hsla>,
base: Div,
body: SmallVec<[AnyElement; 2]>,
}
@@ -114,10 +115,17 @@ impl<K: Clone + PartialEq + 'static> Flash<K> {
Self {
id: id.into(),
key,
tint: None,
base: div(),
body: SmallVec::new(),
}
}
/// The color it flashes; the selection's unless set.
pub fn tint(mut self, tint: Hsla) -> Self {
self.tint = Some(tint);
self
}
}
impl<K: Clone + PartialEq + 'static> Styled for Flash<K> {
@@ -135,7 +143,7 @@ impl<K: Clone + PartialEq + 'static> ParentElement for Flash<K> {
impl<K: Clone + PartialEq + 'static> RenderOnce for Flash<K> {
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement {
let share = since_change(&self.id, self.key, duration(FLASH, cx), window, cx);
let tint = cx.theme().colors.selection;
let tint = self.tint.unwrap_or(cx.theme().colors.selection);
self.base.children(self.body).when_some(share, |held, t| {
held.bg(tint.opacity(1.0 - ease_out_cubic(t)))
})