~eliasnaur/gio

gio/unit/unit.go -rw-r--r-- 3.0 KiB
all: make unit.Converter concrete and rename to Metric

An interface for scaling dp and sp is overkill, at least for all
current uses. Make it a concrete struct type, and rename it to the
shorter and more precise Metric.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
ui: fix wrong method name in documentation

Signed-off-by: Fabian Geiselhart <me@f4814n.de>
unit: add Value.Scale method

Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: rename package ui to unit

Package ui is now only about units except for the Config.Now method.
Remove Now and rename Config to Converter. Add layout.Config to
replace the old ui.Config.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
ui: add Max, Add for Values

Finding the maximum or adding Values are particularly for adjusting
margins for the safe area insets returned in app.UpdateEvent.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
ui: document types and methods

Signed-off-by: Elias Naur <mail@eliasnaur.com>
ui/layout: replace Sized struct with simpler Constraint.Exact method

While here, add String methods to ui.Value and ui.Unit.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
ui: add doc.go

Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: initial import

Signed-off-by: Elias Naur <mail@eliasnaur.com>