From 76aa78a641980701ac0dd3096b42ad90eacf24c1 Mon Sep 17 00:00:00 2001 From: Jorge Bejar Date: Tue, 6 Aug 2024 11:16:44 -0300 Subject: [PATCH] Fix visibility issue of loading animation in the Model Selector --- src/chat/model_selector.rs | 101 ++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 47 deletions(-) diff --git a/src/chat/model_selector.rs b/src/chat/model_selector.rs index 458d1bc5..0b5a6039 100644 --- a/src/chat/model_selector.rs +++ b/src/chat/model_selector.rs @@ -25,74 +25,81 @@ live_design! { ModelSelectorButton = { width: Fill, height: 54, - flow: Right, + flow: Overlay, - align: {x: 0.0, y: 0.5}, - padding: {left: 16, right: 16, top: 0, bottom: 0}, + loading = { + width: Fill, + height: Fill, + visible: false, + } draw_bg: { instance radius: 3.0, color: #F9FAFB, } - cursor: Hand, - - content = { + { width: Fill, - height: Fit, - flow: Overlay, - padding: {left: 16, top: 0, bottom: 0, right: 0}, + height: Fill, + flow: Right, - loading = { - width: Fill, - height: Fill, - } + align: {x: 0.0, y: 0.5}, + padding: {left: 16, right: 16, top: 0, bottom: 0}, + + cursor: Hand, - choose = { + content = { width: Fill, height: Fit, - - align: {x: 0.0, y: 0.5}, - padding: 16, - - label =