forked from AuroraMiddleware/gtk
menu: Update adjustment usage for sealing
Call gtk_adjustment_set_value() instead of manually updating the value in gtk_menu_scroll_to()
This commit is contained in:
parent
f5a3af9b02
commit
8ea3372395
@ -4759,15 +4759,8 @@ gtk_menu_scroll_to (GtkMenu *menu,
|
||||
|
||||
widget = GTK_WIDGET (menu);
|
||||
|
||||
if (priv->tearoff_active &&
|
||||
priv->tearoff_adjustment &&
|
||||
(priv->tearoff_adjustment->value != offset))
|
||||
{
|
||||
priv->tearoff_adjustment->value =
|
||||
CLAMP (offset,
|
||||
0, priv->tearoff_adjustment->upper - priv->tearoff_adjustment->page_size);
|
||||
gtk_adjustment_value_changed (priv->tearoff_adjustment);
|
||||
}
|
||||
if (priv->tearoff_active && priv->tearoff_adjustment)
|
||||
gtk_adjustment_set_value (priv->tearoff_adjustment, offset);
|
||||
|
||||
/* Move/resize the viewport according to arrows: */
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
|
Loading…
Reference in New Issue
Block a user