mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 23:55:39 +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 {
|
||||
for {
|
||||
if _, ok := e.Next(); !ok {
|
||||
break
|
||||
}
|
||||
for _, ok := e.Next(); ok; _, ok = e.Next() {
|
||||
}
|
||||
twoDp := e.Config.Px(ui.Dp(2))
|
||||
e.padLeft, e.padRight = twoDp, twoDp
|
||||
|
||||
Reference in New Issue
Block a user