Position the overlay in the top right corner of the listview.
This commit is contained in:
@@ -504,7 +504,7 @@ static WidgetTriggerActionResult listview_element_trigger_action ( widget *wid,
|
||||
break;
|
||||
case ACCEPT_HOVERED_CUSTOM:
|
||||
custom = TRUE;
|
||||
__attribute__ ((fallthrough));
|
||||
__attribute__ ( ( fallthrough ) );
|
||||
case ACCEPT_HOVERED_ENTRY:
|
||||
listview_set_selected ( lv, lv->last_offset + i );
|
||||
lv->mouse_activated ( lv, custom, lv->mouse_activated_data );
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user