mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
menu view: position widgets initially at (0, 0)
The default 'Rect' constructor constructs an invalid rectangle where the p1 coordinates are lower than the p2 coordinates. In particular, p1 is set to (1, 1). The 'Widget' implementation uses the points individually as input into the 'Animated_rect' mechanism. This way, widgets end up being positioned at (1, 1) initially and are moved to (0, 0) once the first layout update is applied. By explicitly initializing the '_geometry' to (0x0+0+0), we avoid this initial artifact.
This commit is contained in:
parent
f4542b378c
commit
b00e1f4e4b
@ -155,7 +155,7 @@ class Menu_view::Widget : List_model<Widget>::Element
|
||||
* Position relative to the parent widget and actual size, defined by
|
||||
* the parent
|
||||
*/
|
||||
Rect _geometry { };
|
||||
Rect _geometry { Point(0, 0), Area(0, 0) };
|
||||
|
||||
Animated_rect _animated_geometry { _factory.animator };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user