Просмотр исходного кода

wallet: introduce new priority to distinguish node eval order from its drawing z_index. Also correctly build appdata paths on android (rather than hardcoded).

darkfi 1 год назад
Родитель
Сommit
8a2fb9336b

+ 27 - 0
bin/darkwallet/src/android.rs

@@ -94,3 +94,30 @@ pub fn get_keyboard_height() -> usize {
         ndk_utils::call_int_method!(env, android::ACTIVITY, "getKeyboardHeight", "()I") as usize
     }
 }
+
+pub fn get_appdata_path() -> String {
+    unsafe {
+        let env = android::attach_jni_env();
+
+        let text = ndk_utils::call_object_method!(
+            env,
+            android::ACTIVITY,
+            "getAppDataPath",
+            "()Ljava/lang/String;"
+        );
+        ndk_utils::get_utf_str!(env, text).to_string()
+    }
+}
+pub fn get_external_storage_path() -> String {
+    unsafe {
+        let env = android::attach_jni_env();
+
+        let text = ndk_utils::call_object_method!(
+            env,
+            android::ACTIVITY,
+            "getExternalStoragePath",
+            "()Ljava/lang/String;"
+        );
+        ndk_utils::get_utf_str!(env, text).to_string()
+    }
+}

+ 27 - 0
bin/darkwallet/src/app/node.rs

@@ -40,6 +40,9 @@ pub fn create_layer(name: &str) -> SceneNode {
     let prop = Property::new("z_index", PropertyType::Uint32, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
+    let prop = Property::new("priority", PropertyType::Uint32, PropertySubType::Null);
+    node.add_property(prop).unwrap();
+
     node
 }
 
@@ -59,6 +62,9 @@ pub fn create_vector_art(name: &str) -> SceneNode {
     let prop = Property::new("z_index", PropertyType::Uint32, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
+    let prop = Property::new("priority", PropertyType::Uint32, PropertySubType::Null);
+    node.add_property(prop).unwrap();
+
     node
 }
 
@@ -78,6 +84,9 @@ pub fn create_button(name: &str) -> SceneNode {
     let prop = Property::new("z_index", PropertyType::Uint32, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
+    let prop = Property::new("priority", PropertyType::Uint32, PropertySubType::Null);
+    node.add_property(prop).unwrap();
+
     node.add_signal("click", "Button clicked event", vec![]).unwrap();
 
     node
@@ -102,6 +111,9 @@ pub fn create_image(name: &str) -> SceneNode {
     let prop = Property::new("z_index", PropertyType::Uint32, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
+    let prop = Property::new("priority", PropertyType::Uint32, PropertySubType::Null);
+    node.add_property(prop).unwrap();
+
     let prop = Property::new("path", PropertyType::Str, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
@@ -134,6 +146,9 @@ pub fn create_text(name: &str) -> SceneNode {
     let prop = Property::new("z_index", PropertyType::Uint32, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
+    let prop = Property::new("priority", PropertyType::Uint32, PropertySubType::Null);
+    node.add_property(prop).unwrap();
+
     let prop = Property::new("debug", PropertyType::Bool, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
@@ -241,6 +256,9 @@ pub fn create_editbox(name: &str) -> SceneNode {
     let prop = Property::new("z_index", PropertyType::Uint32, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
+    let prop = Property::new("priority", PropertyType::Uint32, PropertySubType::Null);
+    node.add_property(prop).unwrap();
+
     let prop = Property::new("debug", PropertyType::Bool, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
@@ -378,6 +396,9 @@ pub fn create_chatedit(name: &str) -> SceneNode {
     let prop = Property::new("z_index", PropertyType::Uint32, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
+    let prop = Property::new("priority", PropertyType::Uint32, PropertySubType::Null);
+    node.add_property(prop).unwrap();
+
     let prop = Property::new("debug", PropertyType::Bool, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
@@ -445,6 +466,9 @@ pub fn create_chatview(name: &str) -> SceneNode {
     let prop = Property::new("z_index", PropertyType::Uint32, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
+    let prop = Property::new("priority", PropertyType::Uint32, PropertySubType::Null);
+    node.add_property(prop).unwrap();
+
     let prop = Property::new("debug", PropertyType::Bool, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
@@ -504,6 +528,9 @@ pub fn create_emoji_picker(name: &str) -> SceneNode {
     let prop = Property::new("z_index", PropertyType::Uint32, PropertySubType::Null);
     node.add_property(prop).unwrap();
 
+    let prop = Property::new("priority", PropertyType::Uint32, PropertySubType::Null);
+    node.add_property(prop).unwrap();
+
     let mut prop = Property::new("scroll", PropertyType::Float32, PropertySubType::Pixel);
     prop.set_ui_text("Scroll", "Scroll down from the top");
     prop.set_range_f32(0., f32::MAX);

+ 2 - 9
bin/darkwallet/src/app/schema/chat.rs

@@ -102,15 +102,11 @@ mod android_ui_consts {
 
 #[cfg(target_os = "android")]
 mod ui_consts {
-    pub const CHATDB_PATH: &str = "/data/data/darkfi.darkwallet/chatdb/";
-    pub const BG_PATH: &str = "bg.png";
     pub use super::android_ui_consts::*;
 }
 
 #[cfg(feature = "emulate-android")]
 mod ui_consts {
-    pub const CHATDB_PATH: &str = "chatdb";
-    pub const BG_PATH: &str = "assets/bg.png";
     pub use super::android_ui_consts::*;
 }
 
@@ -121,11 +117,6 @@ mod ui_consts {
 mod ui_consts {
     use crate::gfx::{Point, Rectangle};
 
-    pub const CHATDB_PATH: &str = "chatdb";
-    pub const BG_PATH: &str = "assets/bg.png";
-
-    // Main menu
-
     // Chat UI
     pub const CHANNEL_LABEL_BASELINE: f32 = 37.;
     pub const BACKARROW_SCALE: f32 = 15.;
@@ -451,6 +442,7 @@ pub async fn make(
     prop.add_depend(&emoji_dynamic_h_prop, 0, "emoji_h");
     layer_node.set_property_bool(Role::App, "is_visible", true).unwrap();
     layer_node.set_property_u32(Role::App, "z_index", 1).unwrap();
+    layer_node.set_property_u32(Role::App, "priority", 1).unwrap();
     let layer_node =
         layer_node.setup(|me| Layer::new(me, app.render_api.clone(), app.ex.clone())).await;
     chat_layer_node.clone().link(layer_node.clone());
@@ -786,6 +778,7 @@ pub async fn make(
         prop.set_f32(Role::App, 3, 1.).unwrap();
     }
     node.set_property_u32(Role::App, "z_index", 6).unwrap();
+    node.set_property_u32(Role::App, "priority", 1).unwrap();
     //node.set_property_bool(Role::App, "debug", true).unwrap();
 
     let editz_text = PropertyStr::wrap(&node, Role::App, "text", 0).unwrap();

+ 15 - 2
bin/darkwallet/src/app/schema/mod.rs

@@ -53,9 +53,13 @@ mod android_ui_consts {
 
 #[cfg(target_os = "android")]
 mod ui_consts {
-    pub const CHATDB_PATH: &str = "/data/data/darkfi.darkwallet/chatdb/";
+    pub const CHATDB_PATH: &str = "APPDATA/chatdb/";
     pub const BG_PATH: &str = "bg.png";
     pub use super::android_ui_consts::*;
+
+    pub fn get_chatdb_path() -> String {
+        CHATDB_PATH.replace("APPDATA", &crate::android::get_appdata_path())
+    }
 }
 
 #[cfg(feature = "emulate-android")]
@@ -63,6 +67,10 @@ mod ui_consts {
     pub const CHATDB_PATH: &str = "chatdb";
     pub const BG_PATH: &str = "assets/bg.png";
     pub use super::android_ui_consts::*;
+
+    pub fn get_chatdb_path() -> String {
+        CHATDB_PATH.to_string()
+    }
 }
 
 #[cfg(all(
@@ -73,6 +81,10 @@ mod ui_consts {
     pub const CHATDB_PATH: &str = "chatdb";
     pub const BG_PATH: &str = "assets/bg.png";
     pub const EMOJI_PICKER_ICON_SIZE: f32 = 40.;
+
+    pub fn get_chatdb_path() -> String {
+        CHATDB_PATH.to_string()
+    }
 }
 
 use ui_consts::*;
@@ -179,7 +191,8 @@ pub async fn make(app: &App, window: SceneNodePtr) {
         }
     });
 
-    let db = sled::open(CHATDB_PATH).expect("cannot open sleddb");
+    let chatdb_path = get_chatdb_path();
+    let db = sled::open(chatdb_path).expect("cannot open sleddb");
     for channel in CHANNELS {
         chat::make(app, window.clone(), channel, &db, emoji_meshes.clone()).await;
     }

+ 4 - 1
bin/darkwallet/src/gfx/mod.rs

@@ -690,12 +690,14 @@ impl Stage {
         }
         for (key, val) in dcs {
             let val = val.compile(&self.textures, &self.buffers, timest);
+            self.draw_calls.insert(key, val);
+            /*
             match self.draw_calls.get_mut(&key) {
                 Some(old_val) => {
                     // Only replace the draw call if it is more recent
                     if old_val.timest < timest {
                         *old_val = val;
-                    } else if DEBUG_GFXAPI {
+                    } else {
                         debug!(target: "gfx", "Rejected stale draw_call {key}: {val:?}");
                     }
                 }
@@ -703,6 +705,7 @@ impl Stage {
                     self.draw_calls.insert(key, val);
                 }
             }
+                    */
         }
     }
 }

+ 5 - 2
bin/darkwallet/src/ui/button.rs

@@ -41,6 +41,7 @@ pub struct Button {
     is_active: PropertyBool,
     rect: PropertyRect,
     z_index: PropertyUint32,
+    priority: PropertyUint32,
 
     mouse_btn_held: AtomicBool,
 }
@@ -53,12 +54,14 @@ impl Button {
         let is_active = PropertyBool::wrap(node_ref, Role::Internal, "is_active", 0).unwrap();
         let rect = PropertyRect::wrap(node_ref, Role::Internal, "rect").unwrap();
         let z_index = PropertyUint32::wrap(node_ref, Role::Internal, "z_index", 0).unwrap();
+        let priority = PropertyUint32::wrap(node_ref, Role::Internal, "priority", 0).unwrap();
 
         let self_ = Arc::new(Self {
             node,
             is_active,
             rect,
             z_index,
+            priority,
             mouse_btn_held: AtomicBool::new(false),
         });
 
@@ -68,8 +71,8 @@ impl Button {
 
 #[async_trait]
 impl UIObject for Button {
-    fn z_index(&self) -> u32 {
-        self.z_index.get()
+    fn priority(&self) -> u32 {
+        self.priority.get()
     }
 
     async fn draw(&self, parent_rect: Rectangle) -> Option<DrawUpdate> {

+ 5 - 2
bin/darkwallet/src/ui/chatedit.rs

@@ -494,6 +494,7 @@ pub struct ChatEdit {
     handle_descent: PropertyFloat32,
     select_text: PropertyPtr,
     z_index: PropertyUint32,
+    priority: PropertyUint32,
     debug: PropertyBool,
 
     text_wrap: SyncMutex<TextWrap>,
@@ -564,6 +565,7 @@ impl ChatEdit {
         let cursor_idle_time =
             PropertyUint32::wrap(node_ref, Role::Internal, "cursor_idle_time", 0).unwrap();
         let z_index = PropertyUint32::wrap(node_ref, Role::Internal, "z_index", 0).unwrap();
+        let priority = PropertyUint32::wrap(node_ref, Role::Internal, "priority", 0).unwrap();
         let debug = PropertyBool::wrap(node_ref, Role::Internal, "debug", 0).unwrap();
 
         let node_name = node_ref.name.clone();
@@ -614,6 +616,7 @@ impl ChatEdit {
             handle_descent,
             select_text,
             z_index,
+            priority,
             debug,
 
             text_wrap: SyncMutex::new(TextWrap::new(
@@ -1763,8 +1766,8 @@ impl Drop for ChatEdit {
 
 #[async_trait]
 impl UIObject for ChatEdit {
-    fn z_index(&self) -> u32 {
-        self.z_index.get()
+    fn priority(&self) -> u32 {
+        self.priority.get()
     }
 
     async fn start(self: Arc<Self>, ex: ExecutorPtr) {

+ 5 - 2
bin/darkwallet/src/ui/chatview/mod.rs

@@ -165,6 +165,7 @@ pub struct ChatView {
     rect: PropertyRect,
     scroll: PropertyFloat32,
     z_index: PropertyUint32,
+    priority: PropertyUint32,
 
     scroll_start_accel: PropertyFloat32,
     scroll_resist: PropertyFloat32,
@@ -213,6 +214,7 @@ impl ChatView {
         let nick_colors = node_ref.get_property("nick_colors").expect("ChatView::nick_colors");
         let hi_bg_color = PropertyColor::wrap(node_ref, Role::Internal, "hi_bg_color").unwrap();
         let z_index = PropertyUint32::wrap(node_ref, Role::Internal, "z_index", 0).unwrap();
+        let priority = PropertyUint32::wrap(node_ref, Role::Internal, "priority", 0).unwrap();
         let debug = PropertyBool::wrap(node_ref, Role::Internal, "debug", 0).unwrap();
 
         let scroll_start_accel =
@@ -258,6 +260,7 @@ impl ChatView {
             rect,
             scroll,
             z_index,
+            priority,
 
             scroll_start_accel,
             scroll_resist,
@@ -691,8 +694,8 @@ impl ChatView {
 
 #[async_trait]
 impl UIObject for ChatView {
-    fn z_index(&self) -> u32 {
-        self.z_index.get()
+    fn priority(&self) -> u32 {
+        self.priority.get()
     }
 
     async fn start(self: Arc<Self>, ex: ExecutorPtr) {

+ 5 - 2
bin/darkwallet/src/ui/editbox/mod.rs

@@ -175,6 +175,7 @@ pub struct EditBox {
     select_descent: PropertyFloat32,
     selected: PropertyPtr,
     z_index: PropertyUint32,
+    priority: PropertyUint32,
     debug: PropertyBool,
 
     editable: SyncMutex<Editable>,
@@ -236,6 +237,7 @@ impl EditBox {
         let cursor_idle_time =
             PropertyUint32::wrap(node_ref, Role::Internal, "cursor_idle_time", 0).unwrap();
         let z_index = PropertyUint32::wrap(node_ref, Role::Internal, "z_index", 0).unwrap();
+        let priority = PropertyUint32::wrap(node_ref, Role::Internal, "priority", 0).unwrap();
         let debug = PropertyBool::wrap(node_ref, Role::Internal, "debug", 0).unwrap();
 
         let node_name = node_ref.name.clone();
@@ -278,6 +280,7 @@ impl EditBox {
             select_descent,
             selected,
             z_index,
+            priority,
             debug,
 
             editable: SyncMutex::new(Editable::new(
@@ -1257,8 +1260,8 @@ impl Drop for EditBox {
 
 #[async_trait]
 impl UIObject for EditBox {
-    fn z_index(&self) -> u32 {
-        self.z_index.get()
+    fn priority(&self) -> u32 {
+        self.priority.get()
     }
 
     async fn start(self: Arc<Self>, ex: ExecutorPtr) {

+ 5 - 2
bin/darkwallet/src/ui/emoji_picker/mod.rs

@@ -128,6 +128,7 @@ pub struct EmojiPicker {
 
     rect: PropertyRect,
     z_index: PropertyUint32,
+    priority: PropertyUint32,
     scroll: PropertyFloat32,
     emoji_size: PropertyFloat32,
     mouse_scroll_speed: PropertyFloat32,
@@ -151,6 +152,7 @@ impl EmojiPicker {
         let node_ref = &node.upgrade().unwrap();
         let rect = PropertyRect::wrap(node_ref, Role::Internal, "rect").unwrap();
         let z_index = PropertyUint32::wrap(node_ref, Role::Internal, "z_index", 0).unwrap();
+        let priority = PropertyUint32::wrap(node_ref, Role::Internal, "priority", 0).unwrap();
         let scroll = PropertyFloat32::wrap(node_ref, Role::Internal, "scroll", 0).unwrap();
         let emoji_size = PropertyFloat32::wrap(node_ref, Role::Internal, "emoji_size", 0).unwrap();
         let mouse_scroll_speed =
@@ -169,6 +171,7 @@ impl EmojiPicker {
 
             rect,
             z_index,
+            priority,
             scroll,
             emoji_size,
             mouse_scroll_speed,
@@ -300,8 +303,8 @@ impl EmojiPicker {
 
 #[async_trait]
 impl UIObject for EmojiPicker {
-    fn z_index(&self) -> u32 {
-        self.z_index.get()
+    fn priority(&self) -> u32 {
+        self.priority.get()
     }
 
     async fn start(self: Arc<Self>, ex: ExecutorPtr) {

+ 5 - 2
bin/darkwallet/src/ui/image.rs

@@ -51,6 +51,7 @@ pub struct Image {
     rect: PropertyRect,
     uv: PropertyRect,
     z_index: PropertyUint32,
+    priority: PropertyUint32,
     path: PropertyStr,
 
     parent_rect: SyncMutex<Option<Rectangle>>,
@@ -64,6 +65,7 @@ impl Image {
         let rect = PropertyRect::wrap(node_ref, Role::Internal, "rect").unwrap();
         let uv = PropertyRect::wrap(node_ref, Role::Internal, "uv").unwrap();
         let z_index = PropertyUint32::wrap(node_ref, Role::Internal, "z_index", 0).unwrap();
+        let priority = PropertyUint32::wrap(node_ref, Role::Internal, "priority", 0).unwrap();
         let path = PropertyStr::wrap(node_ref, Role::Internal, "path", 0).unwrap();
 
         let node_name = node_ref.name.clone();
@@ -80,6 +82,7 @@ impl Image {
             rect,
             uv,
             z_index,
+            priority,
             path,
 
             parent_rect: SyncMutex::new(None),
@@ -181,8 +184,8 @@ impl Image {
 
 #[async_trait]
 impl UIObject for Image {
-    fn z_index(&self) -> u32 {
-        self.z_index.get()
+    fn priority(&self) -> u32 {
+        self.priority.get()
     }
 
     async fn start(self: Arc<Self>, ex: ExecutorPtr) {

+ 6 - 3
bin/darkwallet/src/ui/layer.rs

@@ -46,6 +46,7 @@ pub struct Layer {
     is_visible: PropertyBool,
     rect: PropertyRect,
     z_index: PropertyUint32,
+    priority: PropertyUint32,
 
     parent_rect: SyncMutex<Option<Rectangle>>,
 }
@@ -57,6 +58,7 @@ impl Layer {
         let is_visible = PropertyBool::wrap(node_ref, Role::Internal, "is_visible", 0).unwrap();
         let rect = PropertyRect::wrap(node_ref, Role::Internal, "rect").unwrap();
         let z_index = PropertyUint32::wrap(node_ref, Role::Internal, "z_index", 0).unwrap();
+        let priority = PropertyUint32::wrap(node_ref, Role::Internal, "priority", 0).unwrap();
 
         let node_name = node_ref.name.clone();
         let node_id = node_ref.id;
@@ -70,6 +72,7 @@ impl Layer {
             is_visible,
             rect,
             z_index,
+            priority,
 
             parent_rect: SyncMutex::new(None),
         });
@@ -123,7 +126,7 @@ impl Layer {
         let dc = GfxDrawCall {
             instrs: vec![GfxDrawInstruction::ApplyView(rect)],
             dcs: child_calls,
-            z_index: self.z_index(),
+            z_index: self.z_index.get(),
         };
         draw_calls.push((self.dc_key, dc));
         Some(DrawUpdate { key: self.dc_key, draw_calls })
@@ -132,8 +135,8 @@ impl Layer {
 
 #[async_trait]
 impl UIObject for Layer {
-    fn z_index(&self) -> u32 {
-        self.z_index.get()
+    fn priority(&self) -> u32 {
+        self.priority.get()
     }
 
     async fn start(self: Arc<Self>, ex: ExecutorPtr) {

+ 4 - 4
bin/darkwallet/src/ui/mod.rs

@@ -56,7 +56,7 @@ pub use win::{Window, WindowPtr};
 
 #[async_trait]
 pub trait UIObject: Sync {
-    fn z_index(&self) -> u32;
+    fn priority(&self) -> u32;
 
     async fn start(self: Arc<Self>, ex: ExecutorPtr) {}
 
@@ -210,10 +210,10 @@ pub fn get_children_ordered(node: &SceneNode3) -> Vec<SceneNodePtr> {
     let mut child_infs = vec![];
     for child in node.get_children() {
         let obj = get_ui_object3(&child);
-        let z_index = obj.z_index();
-        child_infs.push((child, z_index));
+        let priority = obj.priority();
+        child_infs.push((child, priority));
     }
-    child_infs.sort_unstable_by_key(|(_, z_index)| *z_index);
+    child_infs.sort_unstable_by_key(|(_, priority)| *priority);
 
     let nodes = child_infs.into_iter().rev().map(|(node, _)| node).collect();
     nodes

+ 5 - 2
bin/darkwallet/src/ui/text.rs

@@ -56,6 +56,7 @@ pub struct Text {
 
     rect: PropertyRect,
     z_index: PropertyUint32,
+    priority: PropertyUint32,
     text: PropertyStr,
     font_size: PropertyFloat32,
     text_color: PropertyColor,
@@ -79,6 +80,7 @@ impl Text {
         let node_ref = &node.upgrade().unwrap();
         let rect = PropertyRect::wrap(node_ref, Role::Internal, "rect").unwrap();
         let z_index = PropertyUint32::wrap(node_ref, Role::Internal, "z_index", 0).unwrap();
+        let priority = PropertyUint32::wrap(node_ref, Role::Internal, "priority", 0).unwrap();
         let text = PropertyStr::wrap(node_ref, Role::Internal, "text", 0).unwrap();
         let font_size = PropertyFloat32::wrap(node_ref, Role::Internal, "font_size", 0).unwrap();
         let text_color = PropertyColor::wrap(node_ref, Role::Internal, "text_color").unwrap();
@@ -97,6 +99,7 @@ impl Text {
 
             rect,
             z_index,
+            priority,
             text,
             font_size,
             text_color,
@@ -195,8 +198,8 @@ impl Text {
 
 #[async_trait]
 impl UIObject for Text {
-    fn z_index(&self) -> u32 {
-        self.z_index.get()
+    fn priority(&self) -> u32 {
+        self.priority.get()
     }
 
     async fn start(self: Arc<Self>, ex: ExecutorPtr) {

+ 11 - 4
bin/darkwallet/src/ui/vector_art/mod.rs

@@ -51,6 +51,7 @@ pub struct VectorArt {
     is_visible: PropertyBool,
     rect: PropertyRect,
     z_index: PropertyUint32,
+    priority: PropertyUint32,
 
     parent_rect: SyncMutex<Option<Rectangle>>,
 }
@@ -68,6 +69,7 @@ impl VectorArt {
         let is_visible = PropertyBool::wrap(node_ref, Role::Internal, "is_visible", 0).unwrap();
         let rect = PropertyRect::wrap(node_ref, Role::Internal, "rect").unwrap();
         let z_index = PropertyUint32::wrap(node_ref, Role::Internal, "z_index", 0).unwrap();
+        let priority = PropertyUint32::wrap(node_ref, Role::Internal, "priority", 0).unwrap();
 
         let node_name = node_ref.name.clone();
         let node_id = node_ref.id;
@@ -83,6 +85,7 @@ impl VectorArt {
             is_visible,
             rect,
             z_index,
+            priority,
 
             parent_rect: SyncMutex::new(None),
         });
@@ -100,7 +103,7 @@ impl VectorArt {
             return;
         };
         self.render_api.replace_draw_calls(timest, draw_update.draw_calls);
-        //debug!(target: "ui::vector_art", "replace draw calls done");
+        debug!(target: "ui::vector_art", "VectorArt::redraw({:?}) DONE [timest={timest}]", self.node.upgrade().unwrap());
     }
 
     fn get_draw_instrs(&self) -> Vec<GfxDrawInstruction> {
@@ -130,6 +133,8 @@ impl VectorArt {
             warn!(target: "ui::vector_art", "Rect eval failure: {e}");
             return None
         }
+        let rect = self.rect.get();
+        debug!(target: "ui::vector_art", "VectorArt::get_draw_calls() [rect={rect:?}, dc={}]", self.dc_key);
 
         let instrs = self.get_draw_instrs();
 
@@ -145,8 +150,8 @@ impl VectorArt {
 
 #[async_trait]
 impl UIObject for VectorArt {
-    fn z_index(&self) -> u32 {
-        self.z_index.get()
+    fn priority(&self) -> u32 {
+        self.priority.get()
     }
 
     async fn start(self: Arc<Self>, ex: ExecutorPtr) {
@@ -167,7 +172,9 @@ impl UIObject for VectorArt {
     async fn draw(&self, parent_rect: Rectangle) -> Option<DrawUpdate> {
         debug!(target: "ui::vector_art", "VectorArt::draw({:?})", self.node.upgrade().unwrap());
         *self.parent_rect.lock().unwrap() = Some(parent_rect);
-        self.get_draw_calls(parent_rect).await
+        let update = self.get_draw_calls(parent_rect).await;
+        debug!(target: "ui::vector_art", "VectorArt::draw({:?}) DONE", self.node.upgrade().unwrap());
+        update
     }
 }
 

+ 1 - 1
bin/darkwallet/src/ui/win.rs

@@ -470,6 +470,6 @@ impl Window {
 
         self.render_api.replace_draw_calls(timest, draw_calls);
 
-        debug!(target: "ui::win", "Window::draw() - replaced draw call");
+        debug!(target: "ui::win", "Window::draw() - replaced draw call [timest={timest}]");
     }
 }