mirror of
https://github.com/nicbarker/clay.git
synced 2025-09-18 12:36:17 +00:00
[bindings/odin] SizingFit and SizingGrow default parameters
[bindings/odin] indentation
This commit is contained in:
parent
516e85bdfe
commit
1b70ae7540
|
@ -186,7 +186,7 @@ FloatingElementConfig :: struct {
|
||||||
attachment: FloatingAttachPoints,
|
attachment: FloatingAttachPoints,
|
||||||
pointerCaptureMode: PointerCaptureMode,
|
pointerCaptureMode: PointerCaptureMode,
|
||||||
attachTo: FloatingAttachToElement,
|
attachTo: FloatingAttachToElement,
|
||||||
clipTo: FloatingClipToElement,
|
clipTo: FloatingClipToElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
TextRenderData :: struct {
|
TextRenderData :: struct {
|
||||||
|
@ -342,7 +342,7 @@ ElementDeclaration :: struct {
|
||||||
layout: LayoutConfig,
|
layout: LayoutConfig,
|
||||||
backgroundColor: Color,
|
backgroundColor: Color,
|
||||||
cornerRadius: CornerRadius,
|
cornerRadius: CornerRadius,
|
||||||
aspectRatio: AspectRatioElementConfig,
|
aspectRatio: AspectRatioElementConfig,
|
||||||
image: ImageElementConfig,
|
image: ImageElementConfig,
|
||||||
floating: FloatingElementConfig,
|
floating: FloatingElementConfig,
|
||||||
custom: CustomElementConfig,
|
custom: CustomElementConfig,
|
||||||
|
@ -460,11 +460,11 @@ CornerRadiusAll :: proc(radius: f32) -> CornerRadius {
|
||||||
return CornerRadius{radius, radius, radius, radius}
|
return CornerRadius{radius, radius, radius, radius}
|
||||||
}
|
}
|
||||||
|
|
||||||
SizingFit :: proc(sizeMinMax: SizingConstraintsMinMax) -> SizingAxis {
|
SizingFit :: proc(sizeMinMax: SizingConstraintsMinMax = {}) -> SizingAxis {
|
||||||
return SizingAxis{type = SizingType.Fit, constraints = {sizeMinMax = sizeMinMax}}
|
return SizingAxis{type = SizingType.Fit, constraints = {sizeMinMax = sizeMinMax}}
|
||||||
}
|
}
|
||||||
|
|
||||||
SizingGrow :: proc(sizeMinMax: SizingConstraintsMinMax) -> SizingAxis {
|
SizingGrow :: proc(sizeMinMax: SizingConstraintsMinMax = {}) -> SizingAxis {
|
||||||
return SizingAxis{type = SizingType.Grow, constraints = {sizeMinMax = sizeMinMax}}
|
return SizingAxis{type = SizingType.Grow, constraints = {sizeMinMax = sizeMinMax}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,4 +486,4 @@ ID :: proc(label: string, index: u32 = 0) -> ElementId {
|
||||||
|
|
||||||
ID_LOCAL :: proc(label: string, index: u32 = 0) -> ElementId {
|
ID_LOCAL :: proc(label: string, index: u32 = 0) -> ElementId {
|
||||||
return _HashString(MakeString(label), index, _GetParentElementId())
|
return _HashString(MakeString(label), index, _GetParentElementId())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue