Position the overlay in the top right corner of the listview.

This commit is contained in:
Dave Davenport
2017-06-12 08:17:28 +02:00
parent c53e6cc20c
commit 26d9da7263
5 changed files with 53 additions and 18 deletions

View File

@@ -569,3 +569,26 @@ int widget_get_desired_width ( widget *wid )
}
return wid->w;
}
int widget_get_absolute_xpos ( widget *wid )
{
int retv = 0;
if ( wid ) {
retv += wid->x;
if ( wid->parent ) {
retv += widget_get_absolute_xpos ( wid->parent );
}
}
return retv;
}
int widget_get_absolute_ypos ( widget *wid )
{
int retv = 0;
if ( wid ) {
retv += wid->y;
if ( wid->parent ) {
retv += widget_get_absolute_ypos ( wid->parent );
}
}
return retv;
}