mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
ui/text: shorten event loop in Editor.Layout
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-4
@@ -155,10 +155,7 @@ func (e *Editor) Focus() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *Editor) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
func (e *Editor) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
||||||
for {
|
for _, ok := e.Next(); ok; _, ok = e.Next() {
|
||||||
if _, ok := e.Next(); !ok {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
twoDp := e.Config.Px(ui.Dp(2))
|
twoDp := e.Config.Px(ui.Dp(2))
|
||||||
e.padLeft, e.padRight = twoDp, twoDp
|
e.padLeft, e.padRight = twoDp, twoDp
|
||||||
|
|||||||
Reference in New Issue
Block a user