Przeglądaj źródła

Automatically set up frame widget margins.

Kestrel 3 miesięcy temu
rodzic
commit
49f766f3e5
2 zmienionych plików z 2 dodań i 0 usunięć
  1. 1 0
      .gitignore
  2. 1 0
      src/widget/frame.rs

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
 /target
 /Cargo.lock
 .*.swp
+*.layout_tree

+ 1 - 0
src/widget/frame.rs

@@ -22,6 +22,7 @@ impl<C: Component> Frame<C> {
             .set_arrangement(ChildArrangement::Container)
             .set_height_policy(SizePolicy::expanding(1))
             .set_width_policy(SizePolicy::expanding(1));
+        *nnode.margin_mut() = PixelSideOffsets::new_all_same(uih.theme().border_width as i32);
         Self {
             layout: nnode,
             child: None,