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
@@ -20,6 +20,8 @@ pub enum ButtonVariant {
|
||||
Outline,
|
||||
Ghost,
|
||||
Subtle,
|
||||
/// Confirms a gain, such as a purchase; green.
|
||||
Success,
|
||||
Danger,
|
||||
Link,
|
||||
}
|
||||
@@ -70,6 +72,13 @@ pub(crate) fn tone(variant: ButtonVariant, colors: &Palette) -> Tone {
|
||||
fg: colors.fg,
|
||||
border: clear,
|
||||
},
|
||||
ButtonVariant::Success => Tone {
|
||||
bg: colors.success,
|
||||
hover: colors.success.mix(&colors.fg, 0.14),
|
||||
pressed: colors.success.mix(&colors.fg, 0.24),
|
||||
fg: colors.on_accent,
|
||||
border: clear,
|
||||
},
|
||||
ButtonVariant::Danger => Tone {
|
||||
bg: colors.danger,
|
||||
hover: colors.danger.mix(&colors.fg, 0.14),
|
||||
|
||||
@@ -145,7 +145,7 @@ impl RenderOnce for SegmentedControl {
|
||||
.when_some(icon, |segment, icon| {
|
||||
segment.child(Icon::new(icon).size(icon_size).color(fg))
|
||||
})
|
||||
.child(label)
|
||||
.when(!label.is_empty(), |segment| segment.child(label))
|
||||
.child(measure_item(measure, ix, Axis::Horizontal))
|
||||
});
|
||||
div()
|
||||
|
||||
Reference in new issue
Block a user