mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
ui/test: invalidate Editor layout on scale changes
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+4
-1
@@ -61,6 +61,9 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (e *Editor) Update(c *ui.Config, pq pointer.Events, kq key.Events) {
|
func (e *Editor) Update(c *ui.Config, pq pointer.Events, kq key.Events) {
|
||||||
|
if e.cfg == nil || c.PxPerDp != e.cfg.PxPerDp || c.PxPerSp != e.cfg.PxPerSp {
|
||||||
|
e.invalidate()
|
||||||
|
}
|
||||||
e.cfg = c
|
e.cfg = c
|
||||||
sbounds := e.scrollBounds()
|
sbounds := e.scrollBounds()
|
||||||
var smin, smax int
|
var smin, smax int
|
||||||
@@ -136,7 +139,7 @@ func (e *Editor) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
|||||||
}
|
}
|
||||||
if maxWidth != e.maxWidth {
|
if maxWidth != e.maxWidth {
|
||||||
e.maxWidth = maxWidth
|
e.maxWidth = maxWidth
|
||||||
e.valid = false
|
e.invalidate()
|
||||||
}
|
}
|
||||||
|
|
||||||
e.layout()
|
e.layout()
|
||||||
|
|||||||
Reference in New Issue
Block a user