mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
gtk4-demo: Fix the scrollbar popup menu example
A scrollbar is not a range anymore, so the callback needs some adjustments (!).
This commit is contained in:
parent
7e64ee52a8
commit
e1338e4e12
@ -958,7 +958,7 @@ start_cb (GtkMenuItem *item, GtkWidget *scrollbar)
|
||||
{
|
||||
GtkAdjustment *adj;
|
||||
|
||||
adj = gtk_range_get_adjustment (GTK_RANGE (scrollbar));
|
||||
adj = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (scrollbar));
|
||||
gtk_adjustment_set_value (adj, gtk_adjustment_get_lower (adj));
|
||||
}
|
||||
|
||||
@ -967,7 +967,7 @@ end_cb (GtkMenuItem *item, GtkWidget *scrollbar)
|
||||
{
|
||||
GtkAdjustment *adj;
|
||||
|
||||
adj = gtk_range_get_adjustment (GTK_RANGE (scrollbar));
|
||||
adj = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (scrollbar));
|
||||
gtk_adjustment_set_value (adj, gtk_adjustment_get_upper (adj) - gtk_adjustment_get_page_size (adj));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user