Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kayak UI 0.11
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Microhacks
Bevy Forks
Kayak UI 0.11
Commits
aeced1fc
Commit
aeced1fc
authored
3 years ago
by
MrGVSV
Browse files
Options
Downloads
Patches
Plain Diff
Added row_gap and col_gap
parent
6d552cb2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
kayak_core/src/node.rs
+20
-2
20 additions, 2 deletions
kayak_core/src/node.rs
kayak_core/src/styles.rs
+6
-0
6 additions, 0 deletions
kayak_core/src/styles.rs
with
26 additions
and
2 deletions
kayak_core/src/node.rs
+
20
−
2
View file @
aeced1fc
...
@@ -307,11 +307,29 @@ impl<'a> morphorm::Node<'a> for Index {
...
@@ -307,11 +307,29 @@ impl<'a> morphorm::Node<'a> for Index {
return
Some
(
morphorm
::
Units
::
Auto
);
return
Some
(
morphorm
::
Units
::
Auto
);
}
}
fn
row_between
(
&
self
,
_store
:
&
'_
Self
::
Data
)
->
Option
<
morphorm
::
Units
>
{
fn
row_between
(
&
self
,
store
:
&
'_
Self
::
Data
)
->
Option
<
morphorm
::
Units
>
{
if
let
Some
(
node
)
=
store
.get
(
*
self
)
{
if
let
Some
(
node
)
=
node
{
return
match
node
.resolved_styles.row_gap
{
StyleProp
::
Default
=>
Some
(
morphorm
::
Units
::
Auto
),
StyleProp
::
Value
(
prop
)
=>
Some
(
prop
),
_
=>
Some
(
morphorm
::
Units
::
Auto
),
};
}
}
Some
(
morphorm
::
Units
::
Auto
)
Some
(
morphorm
::
Units
::
Auto
)
}
}
fn
col_between
(
&
self
,
_store
:
&
'_
Self
::
Data
)
->
Option
<
morphorm
::
Units
>
{
fn
col_between
(
&
self
,
store
:
&
'_
Self
::
Data
)
->
Option
<
morphorm
::
Units
>
{
if
let
Some
(
node
)
=
store
.get
(
*
self
)
{
if
let
Some
(
node
)
=
node
{
return
match
node
.resolved_styles.col_gap
{
StyleProp
::
Default
=>
Some
(
morphorm
::
Units
::
Auto
),
StyleProp
::
Value
(
prop
)
=>
Some
(
prop
),
_
=>
Some
(
morphorm
::
Units
::
Auto
),
};
}
}
Some
(
morphorm
::
Units
::
Auto
)
Some
(
morphorm
::
Units
::
Auto
)
}
}
...
...
This diff is collapsed.
Click to expand it.
kayak_core/src/styles.rs
+
6
−
0
View file @
aeced1fc
...
@@ -142,6 +142,8 @@ define_styles! {
...
@@ -142,6 +142,8 @@ define_styles! {
pub
border
:
StyleProp
<
(
f32
,
f32
,
f32
,
f32
)
>
,
pub
border
:
StyleProp
<
(
f32
,
f32
,
f32
,
f32
)
>
,
pub
bottom
:
StyleProp
<
Units
>
,
pub
bottom
:
StyleProp
<
Units
>
,
pub
color
:
StyleProp
<
Color
>
,
pub
color
:
StyleProp
<
Color
>
,
/// The spacing between child widgets along the horizontal axis
pub
col_gap
:
StyleProp
<
Units
>
,
pub
cursor
:
StyleProp
<
CursorIcon
>
,
pub
cursor
:
StyleProp
<
CursorIcon
>
,
pub
height
:
StyleProp
<
Units
>
,
pub
height
:
StyleProp
<
Units
>
,
pub
layout_type
:
StyleProp
<
LayoutType
>
,
pub
layout_type
:
StyleProp
<
LayoutType
>
,
...
@@ -158,6 +160,8 @@ define_styles! {
...
@@ -158,6 +160,8 @@ define_styles! {
pub
position_type
:
StyleProp
<
PositionType
>
,
pub
position_type
:
StyleProp
<
PositionType
>
,
pub
render_command
:
StyleProp
<
RenderCommand
>
,
pub
render_command
:
StyleProp
<
RenderCommand
>
,
pub
right
:
StyleProp
<
Units
>
,
pub
right
:
StyleProp
<
Units
>
,
/// The spacing between child widgets along the vertical axis
pub
row_gap
:
StyleProp
<
Units
>
,
pub
top
:
StyleProp
<
Units
>
,
pub
top
:
StyleProp
<
Units
>
,
pub
width
:
StyleProp
<
Units
>
,
pub
width
:
StyleProp
<
Units
>
,
}
}
...
@@ -177,6 +181,7 @@ impl Style {
...
@@ -177,6 +181,7 @@ impl Style {
bottom
:
StyleProp
::
Default
,
bottom
:
StyleProp
::
Default
,
color
:
StyleProp
::
Inherit
,
color
:
StyleProp
::
Inherit
,
cursor
:
StyleProp
::
Inherit
,
cursor
:
StyleProp
::
Inherit
,
col_gap
:
StyleProp
::
Default
,
height
:
StyleProp
::
Default
,
height
:
StyleProp
::
Default
,
layout_type
:
StyleProp
::
Default
,
layout_type
:
StyleProp
::
Default
,
left
:
StyleProp
::
Default
,
left
:
StyleProp
::
Default
,
...
@@ -192,6 +197,7 @@ impl Style {
...
@@ -192,6 +197,7 @@ impl Style {
position_type
:
StyleProp
::
Default
,
position_type
:
StyleProp
::
Default
,
render_command
:
StyleProp
::
Value
(
RenderCommand
::
Empty
),
render_command
:
StyleProp
::
Value
(
RenderCommand
::
Empty
),
right
:
StyleProp
::
Default
,
right
:
StyleProp
::
Default
,
row_gap
:
StyleProp
::
Default
,
top
:
StyleProp
::
Default
,
top
:
StyleProp
::
Default
,
width
:
StyleProp
::
Default
,
width
:
StyleProp
::
Default
,
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment