mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
ui/layout,ui/text,ui/widget: shorten Widget function names to W
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -128,7 +128,7 @@ func (e *Editor) caretWidth() fixed.Int26_6 {
|
||||
return fixed.Int26_6(oneDp * 64)
|
||||
}
|
||||
|
||||
func (e *Editor) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
||||
func (e *Editor) W(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
||||
twoDp := int(e.cfg.Pixels(ui.Dp(2)) + 0.5)
|
||||
e.padLeft, e.padRight = twoDp, twoDp
|
||||
maxWidth := cs.Width.Max
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ func (l *lineIterator) Next() (String, f32.Point, bool) {
|
||||
return String{}, f32.Point{}, false
|
||||
}
|
||||
|
||||
func (l Label) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
||||
func (l Label) W(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
||||
textLayout := l.Face.Layout(l.Text, false, cs.Width.Max)
|
||||
lines := textLayout.Lines
|
||||
dims := linesDimens(lines)
|
||||
|
||||
Reference in New Issue
Block a user