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:
76 files changed
+10311
-173
No files matched your search
+7
-2
@@ -9,7 +9,7 @@ use smallvec::SmallVec;
|
||||
|
||||
use crate::{
|
||||
theme::{ActiveTheme, ControlSize, Radius, TextSize},
|
||||
typography::LEADING,
|
||||
typography::{Ellipsis, LEADING},
|
||||
};
|
||||
|
||||
type OnClick = Rc<dyn Fn(&ClickEvent, &mut Window, &mut App)>;
|
||||
@@ -95,7 +95,12 @@ impl RenderOnce for ListItem {
|
||||
fn render(self, _: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||
let theme = cx.theme();
|
||||
let colors = &theme.colors;
|
||||
let line = |text: SharedString| div().truncate().line_height(relative(LEADING)).child(text);
|
||||
let line = |text: SharedString| {
|
||||
div()
|
||||
.min_w_0()
|
||||
.line_height(relative(LEADING))
|
||||
.child(Ellipsis::new(text))
|
||||
};
|
||||
let pressable = self.on_click.is_some() && !self.disabled;
|
||||
div()
|
||||
.id(self.id)
|
||||
|
||||
@@ -16,6 +16,7 @@ use crate::{
|
||||
motion::{self, Spinner},
|
||||
primitives::{Disclosure, DragGhost, Icon},
|
||||
theme::{ActiveTheme, ControlSize, IconSize, Radius, TextSize},
|
||||
typography::Ellipsis,
|
||||
};
|
||||
|
||||
/// What drawing rows needs, shared by every range the list asks for.
|
||||
@@ -151,9 +152,8 @@ fn row(rows: &Rows, ix: usize, window: &mut Window, cx: &mut App) -> AnyElement
|
||||
None => div()
|
||||
.flex_1()
|
||||
.min_w_0()
|
||||
.truncate()
|
||||
.when_some(ink, |text, ink| text.text_color(ink))
|
||||
.child(label.clone())
|
||||
.child(Ellipsis::new(label.clone()))
|
||||
.into_any_element(),
|
||||
};
|
||||
let line = |at: DropAt| {
|
||||
|
||||
Reference in new issue
Block a user