From 7a88c0b0979fe999c058377da7dffb83966a78a1 Mon Sep 17 00:00:00 2001 From: Dongdong Zhou Date: Tue, 15 Aug 2023 20:41:44 +0100 Subject: [PATCH] drag style for text --- src/view.rs | 4 ++++ src/views/list.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/view.rs b/src/view.rs index 66555362..2b41f279 100644 --- a/src/view.rs +++ b/src/view.rs @@ -709,6 +709,10 @@ pub trait View { style }; paint_bg(cx, &style, size); + + if style.color.is_some() { + cx.color = style.color; + } self.paint(cx); paint_border(cx, &style, size); paint_outline(cx, &style, size); diff --git a/src/views/list.rs b/src/views/list.rs index 6bccca16..df0927ad 100644 --- a/src/views/list.rs +++ b/src/views/list.rs @@ -373,7 +373,7 @@ pub(super) fn apply_diff( } for DiffOpMove { from, to } in diff.moved { - let item = std::mem::take(&mut children[from]).unwrap(); + let item = children[from].take().unwrap(); items_to_move.push((to, item)); }