Add a note on how to check the telemetry
This commit is contained in:
@@ -869,6 +869,7 @@ pub struct WelcomeStyle {
|
||||
pub page_width: f32,
|
||||
pub logo: IconStyle,
|
||||
pub logo_subheading: ContainedText,
|
||||
pub usage_note: ContainedText,
|
||||
pub checkbox: CheckboxStyle,
|
||||
pub checkbox_container: ContainerStyle,
|
||||
pub button: Interactive<ContainedText>,
|
||||
|
||||
+17
-5
@@ -4,7 +4,7 @@ use gpui::{
|
||||
ConstrainedBox, Container, ContainerStyle, Empty, Flex, KeystrokeLabel, Label,
|
||||
MouseEventHandler, ParentElement, Svg,
|
||||
},
|
||||
Action, Element, EventContext, RenderContext, View,
|
||||
Action, Element, ElementBox, EventContext, RenderContext, View,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
|
||||
@@ -26,6 +26,21 @@ pub fn checkbox<T: 'static, V: View>(
|
||||
checked: bool,
|
||||
cx: &mut RenderContext<V>,
|
||||
change: fn(checked: bool, cx: &mut EventContext) -> (),
|
||||
) -> MouseEventHandler<T> {
|
||||
let label = Label::new(label, style.label.text.clone())
|
||||
.contained()
|
||||
.with_style(style.label.container)
|
||||
.boxed();
|
||||
|
||||
checkbox_with_label(label, style, checked, cx, change)
|
||||
}
|
||||
|
||||
pub fn checkbox_with_label<T: 'static, V: View>(
|
||||
label: ElementBox,
|
||||
style: &CheckboxStyle,
|
||||
checked: bool,
|
||||
cx: &mut RenderContext<V>,
|
||||
change: fn(checked: bool, cx: &mut EventContext) -> (),
|
||||
) -> MouseEventHandler<T> {
|
||||
MouseEventHandler::<T>::new(0, cx, |state, _| {
|
||||
let indicator = if checked {
|
||||
@@ -55,10 +70,7 @@ pub fn checkbox<T: 'static, V: View>(
|
||||
}
|
||||
})
|
||||
.boxed(),
|
||||
Label::new(label, style.label.text.clone())
|
||||
.contained()
|
||||
.with_style(style.label.container)
|
||||
.boxed(),
|
||||
label,
|
||||
])
|
||||
.align_children_center()
|
||||
.boxed()
|
||||
|
||||
Reference in New Issue
Block a user