GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
Implemented prepare_text on TreeList to delegate font shaper offset calculations to the search box child
src/widget/container/treelist.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/widget/container/treelist.rs b/src/widget/container/treelist.rs
index 8a9fea0..74c7a12 100644
--- a/src/widget/container/treelist.rs
+++ b/src/widget/container/treelist.rs
@@ -316,9 +316,13 @@ impl Element for TreeList {
fn focus(&mut self) {
focus::set_focused(self);
}
-
fn unfocus(&mut self) {}
+ fn prepare_text(&mut self, fs: &mut glyphon::FontSystem) {
+ self.search_box.prepare_text(fs);
+ self.scroll_box.prepare_text(fs);
+ }
+
fn mouse_input(&mut self, button: MouseButton, state: ElementState, px: f32, py: f32, ctx: &mut UiContext) -> bool {
let mut changed = self.scroll_box.mouse_input(button, state, px, py, ctx);
if self.search_box.mouse_input(button, state, px, py, ctx) {