mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
ui: document types and methods
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -25,14 +25,18 @@ const (
|
||||
UnitSp
|
||||
)
|
||||
|
||||
// Px returns the Value for v device pixels.
|
||||
func Px(v float32) Value {
|
||||
return Value{V: v, U: UnitPx}
|
||||
}
|
||||
|
||||
// Px returns the Value for v device independent
|
||||
// pixels.
|
||||
func Dp(v float32) Value {
|
||||
return Value{V: v, U: UnitDp}
|
||||
}
|
||||
|
||||
// Sp returns the Value for v scaled dps.
|
||||
func Sp(v float32) Value {
|
||||
return Value{V: v, U: UnitSp}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user