Explorar o código

Automatically set up frame widget margins.

Kestrel hai 3 meses
pai
achega
49f766f3e5
Modificáronse 2 ficheiros con 2 adicións e 0 borrados
  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,