forked from enlightenment/efl
interfaces: replace doubles with Efl.Gfx.Align where appropriate
Summary: this makes the types more explicit Depends on D10554 Reviewers: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10555
This commit is contained in:
parent
d8ea2eb2cd
commit
400e139efa
|
@ -1,3 +1,4 @@
|
|||
import efl_gfx_types;
|
||||
interface @beta Efl.Gfx.Arrangement
|
||||
{
|
||||
[[
|
||||
|
@ -13,19 +14,17 @@ interface @beta Efl.Gfx.Arrangement
|
|||
unused space.
|
||||
|
||||
It is different than the @Efl.Gfx.Hint.hint_align property in that it affects the position
|
||||
of all the contents within the container. For example, if a box widget has extra space
|
||||
on the horizontal axis, this property can be used to align the box's contents to the
|
||||
left or the right side.
|
||||
of all the contents within the container instead of the container itself.
|
||||
For example, if a box widget has extra space on the horizontal axis,
|
||||
this property can be used to align the box's contents to the left or the right side.
|
||||
|
||||
See also @Efl.Gfx.Hint.hint_align.
|
||||
]]
|
||||
set {}
|
||||
get {}
|
||||
values {
|
||||
align_horiz: double(0.5); [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the horizontal
|
||||
axis and 1.0 is at the end.]]
|
||||
align_vert: double(0.5); [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the vertical
|
||||
axis and 1.0 is at the end.]]
|
||||
align_horiz: Efl.Gfx.Align(0.5); [[Controls the horizontal alignment.]]
|
||||
align_vert: Efl.Gfx.Align(0.5); [[Controls the vertical alignment.]]
|
||||
}
|
||||
}
|
||||
@property content_padding @beta {
|
||||
|
|
|
@ -239,26 +239,18 @@ interface Efl.Gfx.Hint
|
|||
@property hint_align {
|
||||
[[Hints for an object's alignment.
|
||||
|
||||
These are hints on how to align an object inside the
|
||||
boundaries of a container/manager. Accepted values are in
|
||||
the 0.0 to 1.0 range.
|
||||
|
||||
For the horizontal component, 0.0 means the start of the axis
|
||||
in the direction that the current language reads, 1.0 means the end of the axis.
|
||||
|
||||
For the vertical component, 0.0 to the top, 1.0 means to the bottom.
|
||||
These are hints on how to align this object inside the
|
||||
boundaries of its container/manager.
|
||||
|
||||
This is not a size enforcement in any way, it's just a hint
|
||||
that should be used whenever appropriate.
|
||||
|
||||
Note: Default alignment hint values are 0.5, for both axes.
|
||||
]]
|
||||
/*
|
||||
@image html alignment-hints.png
|
||||
*/
|
||||
values {
|
||||
x: double; [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the horizontal axis and 1.0 is at the end.]]
|
||||
y: double; [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the vertical axis and 1.0 is at the end.]]
|
||||
x: Efl.Gfx.Align(0.5); [[Controls the horizontal alignment.]]
|
||||
y: Efl.Gfx.Align(0.5); [[Controls the vertical alignment.]]
|
||||
}
|
||||
}
|
||||
@property hint_fill {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import efl_gfx_types;
|
||||
class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Layout, Efl.Pack
|
||||
{
|
||||
[[The relative layout class.
|
||||
|
@ -13,8 +14,8 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Lay
|
|||
}
|
||||
values {
|
||||
target: Efl.Gfx.Entity; [[The relative target.]]
|
||||
relative: double; [[The ratio between left and right of the target,
|
||||
ranging from 0.0 to 1.0.]]
|
||||
relative: Efl.Gfx.Align; [[The ratio between left and right of the target,
|
||||
ranging from 0.0 to 1.0.]]
|
||||
}
|
||||
}
|
||||
@property relation_right {
|
||||
|
@ -25,8 +26,8 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Lay
|
|||
}
|
||||
values {
|
||||
target: Efl.Gfx.Entity; [[The relative target.]]
|
||||
relative: double; [[The ratio between left and right of the target,
|
||||
ranging from 0.0 to 1.0.]]
|
||||
relative: Efl.Gfx.Align; [[The ratio between left and right of the target,
|
||||
ranging from 0.0 to 1.0.]]
|
||||
}
|
||||
}
|
||||
@property relation_top {
|
||||
|
@ -37,8 +38,8 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Lay
|
|||
}
|
||||
values {
|
||||
target: Efl.Gfx.Entity; [[The relative target.]]
|
||||
relative: double; [[The ratio between top and bottom of the target,
|
||||
ranging from 0.0 to 1.0.]]
|
||||
relative: Efl.Gfx.Align; [[The ratio between top and bottom of the target,
|
||||
ranging from 0.0 to 1.0.]]
|
||||
}
|
||||
}
|
||||
@property relation_bottom {
|
||||
|
@ -49,8 +50,8 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Lay
|
|||
}
|
||||
values {
|
||||
target: Efl.Gfx.Entity; [[The relative target.]]
|
||||
relative: double; [[The ratio between top and bottom of the target,
|
||||
ranging from 0.0 to 1.0.]]
|
||||
relative: Efl.Gfx.Align; [[The ratio between top and bottom of the target,
|
||||
ranging from 0.0 to 1.0.]]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue