Repository: zng-ui/zng (language: rust)

Issue:
`WIDGET.border().offsets()` is always zero
<!--
Please, make sure:

- The issue happens in the latest crate release or newer (master branch).
- The issue happens after `cargo update`.
-->

I tried this code:

```rust
fn border_issue() -> impl UiNode {
    Container! {
        widget::border = 30, colors::RED;
        widget::hit_test_mode = widget::HitTestMode::Detailed;
        mouse::on_mouse_move = hn!(|_| {
            dbg!(WIDGET.border().offsets());
        });
    }
}
```

Following these steps:

1 - Run.
2 - Hover the border.

I saw this happen:

Always logs `WIDGET.border().offsets() = (0px,0px,0px,0px)`.

I expected this to happen:

Border offsets in pixels (30 * scale_factor).



Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 574721d59..cf6d9a3b3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
 * **Breaking** Add `open_title_bar_context_menu` to view API.
     - Note that this is only a breaking change for direct dependents of `zng-view-api`.
 * Add `OPEN_TITLE_BAR_CONTEXT_MENU_CMD` to window API.
+* Fix `WIDGET.border().offsets()` not including the innermost border offset.
 
 # 0.4.0
 
diff --git a/crates/zng-app/src/widget/border.rs b/crates/zng-app/src/widget/border.rs
index edecc7dc3..40a9616af 100644
--- a/crates/zng-app/src/widget/border.rs
+++ b/crates/zng-app/src/widget/border.rs
@@ -876,7 +876,7 @@ impl BorderOffsetsData {
             if is_wgt_start {
                 border.set_corner_radius(self.corner_radius);
             }
-            border.set_offsets(self.wgt_offsets);
+            border.set_offsets(self.wgt_inner_offsets);
         }
     }
 


Test patch: