mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Pass the Padding by value in the layout data struct
It can simply be a Copy type anyway. So there is no more special code needed in the rust (and also in C++) generator for it
This commit is contained in:
parent
4b0ae4d5a1
commit
b36de552e5
3 changed files with 7 additions and 17 deletions
|
@ -334,7 +334,7 @@ impl Default for Constraint {
|
|||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Default)]
|
||||
#[derive(Copy, Clone, Debug, Default)]
|
||||
pub struct Padding {
|
||||
pub begin: Coord,
|
||||
pub end: Coord,
|
||||
|
@ -345,7 +345,7 @@ pub struct Padding {
|
|||
pub struct GridLayoutData<'a> {
|
||||
pub size: Coord,
|
||||
pub spacing: Coord,
|
||||
pub padding: &'a Padding,
|
||||
pub padding: Padding,
|
||||
pub cells: Slice<'a, GridLayoutCellData>,
|
||||
}
|
||||
|
||||
|
@ -432,7 +432,7 @@ impl Default for LayoutAlignment {
|
|||
pub struct BoxLayoutData<'a> {
|
||||
pub size: Coord,
|
||||
pub spacing: Coord,
|
||||
pub padding: &'a Padding,
|
||||
pub padding: Padding,
|
||||
pub alignment: LayoutAlignment,
|
||||
pub cells: Slice<'a, BoxLayoutCellData>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue