Checkpoint

This commit is contained in:
Nate Butler 2023-10-13 14:50:37 -04:00
parent 297b6b282c
commit 603765732e
4 changed files with 9 additions and 3 deletions

View file

@ -108,9 +108,10 @@ where
let hovered = self.hovered.clone(); let hovered = self.hovered.clone();
move |_, event: &MouseMoveEvent, phase, cx| { move |_, event: &MouseMoveEvent, phase, cx| {
if phase == DispatchPhase::Capture { if phase == DispatchPhase::Bubble {
if target_bounds.contains_point(event.position) != hovered.load(SeqCst) { if target_bounds.contains_point(event.position) != hovered.load(SeqCst) {
cx.notify(); cx.notify();
cx.stop_propagation();
} }
} }
} }

View file

@ -397,6 +397,7 @@ impl<S: 'static + Send + Sync + Clone> ListEntry<S> {
div() div()
.relative() .relative()
.group("")
.fill(color.surface) .fill(color.surface)
.when(self.state == InteractionState::Focused, |this| { .when(self.state == InteractionState::Focused, |this| {
this.border().border_color(color.border_focused) this.border().border_color(color.border_focused)
@ -411,6 +412,8 @@ impl<S: 'static + Send + Sync + Clone> ListEntry<S> {
.h_full() .h_full()
.flex() .flex()
.justify_center() .justify_center()
.group_hover("")
.fill(color.border_focused)
.child( .child(
h_stack() h_stack()
.child(div().w_px().h_full()) .child(div().w_px().h_full())

View file

@ -24,6 +24,7 @@ pub struct NotificationToast<S: 'static + Send + Sync + Clone> {
impl<S: 'static + Send + Sync + Clone> NotificationToast<S> { impl<S: 'static + Send + Sync + Clone> NotificationToast<S> {
pub fn new( pub fn new(
// TODO: use a `SharedString` here
title: impl Into<String>, title: impl Into<String>,
message: impl Into<String>, message: impl Into<String>,
primary_action: Button<S>, primary_action: Button<S>,

View file

@ -19,7 +19,7 @@ pub struct Token {
impl Default for Token { impl Default for Token {
fn default() -> Self { fn default() -> Self {
Self { Self {
list_indent_depth: AbsoluteLength::Rems(rems(0.3)), list_indent_depth: rems(0.3).into(),
default_panel_size: AbsoluteLength::Rems(rems(16.)), default_panel_size: AbsoluteLength::Rems(rems(16.)),
state_hover_background: hsla(0.0, 0.0, 0.0, 0.08), state_hover_background: hsla(0.0, 0.0, 0.0, 0.08),
state_active_background: hsla(0.0, 0.0, 0.0, 0.16), state_active_background: hsla(0.0, 0.0, 0.0, 0.16),
@ -74,7 +74,8 @@ pub struct ThemeColor {
/// or tapped on a touch screen. /// or tapped on a touch screen.
/// - TODO: Map to step 5. /// - TODO: Map to step 5.
pub filled_element_active: Hsla, pub filled_element_active: Hsla,
/// The background color of a selected element, like a selected tab, a button toggled on, or a checkbox that is checked. /// The background color of a selected element, like a selected tab,
/// a button toggled on, or a checkbox that is checked.
pub filled_element_selected: Hsla, pub filled_element_selected: Hsla,
pub filled_element_disabled: Hsla, pub filled_element_disabled: Hsla,
pub ghost_element: Hsla, pub ghost_element: Hsla,