mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
gail: Update adjustment usage for sealing
This commit is contained in:
parent
801ba1c758
commit
a28be2cc6c
@ -118,7 +118,7 @@ gail_adjustment_get_current_value (AtkValue *obj,
|
||||
return;
|
||||
}
|
||||
|
||||
current_value = adjustment->value;
|
||||
current_value = gtk_adjustment_get_value (adjustment);
|
||||
memset (value, 0, sizeof (GValue));
|
||||
g_value_init (value, G_TYPE_DOUBLE);
|
||||
g_value_set_double (value,current_value);
|
||||
@ -138,7 +138,7 @@ gail_adjustment_get_maximum_value (AtkValue *obj,
|
||||
return;
|
||||
}
|
||||
|
||||
maximum_value = adjustment->upper;
|
||||
maximum_value = gtk_adjustment_get_upper (adjustment);
|
||||
memset (value, 0, sizeof (GValue));
|
||||
g_value_init (value, G_TYPE_DOUBLE);
|
||||
g_value_set_double (value, maximum_value);
|
||||
@ -158,7 +158,7 @@ gail_adjustment_get_minimum_value (AtkValue *obj,
|
||||
return;
|
||||
}
|
||||
|
||||
minimum_value = adjustment->lower;
|
||||
minimum_value = gtk_adjustment_get_lower (adjustment);
|
||||
memset (value, 0, sizeof (GValue));
|
||||
g_value_init (value, G_TYPE_DOUBLE);
|
||||
g_value_set_double (value, minimum_value);
|
||||
@ -178,26 +178,26 @@ gail_adjustment_get_minimum_increment (AtkValue *obj,
|
||||
return;
|
||||
}
|
||||
|
||||
if (adjustment->step_increment != 0 &&
|
||||
adjustment->page_increment != 0)
|
||||
if (gtk_adjustment_get_step_increment (adjustment) != 0 &&
|
||||
gtk_adjustment_get_page_increment (adjustment) != 0)
|
||||
{
|
||||
if (ABS (adjustment->step_increment) < ABS (adjustment->page_increment))
|
||||
minimum_increment = adjustment->step_increment;
|
||||
if (ABS (gtk_adjustment_get_step_increment (adjustment)) < ABS (gtk_adjustment_get_page_increment (adjustment)))
|
||||
minimum_increment = gtk_adjustment_get_step_increment (adjustment);
|
||||
else
|
||||
minimum_increment = adjustment->page_increment;
|
||||
minimum_increment = gtk_adjustment_get_page_increment (adjustment);
|
||||
}
|
||||
else if (adjustment->step_increment == 0 &&
|
||||
adjustment->page_increment == 0)
|
||||
else if (gtk_adjustment_get_step_increment (adjustment) == 0 &&
|
||||
gtk_adjustment_get_page_increment (adjustment) == 0)
|
||||
{
|
||||
minimum_increment = 0;
|
||||
}
|
||||
else if (adjustment->step_increment == 0)
|
||||
else if (gtk_adjustment_get_step_increment (adjustment) == 0)
|
||||
{
|
||||
minimum_increment = adjustment->page_increment;
|
||||
minimum_increment = gtk_adjustment_get_page_increment (adjustment);
|
||||
}
|
||||
else
|
||||
{
|
||||
minimum_increment = adjustment->step_increment;
|
||||
minimum_increment = gtk_adjustment_get_step_increment (adjustment);
|
||||
}
|
||||
|
||||
memset (value, 0, sizeof (GValue));
|
||||
|
@ -1061,9 +1061,9 @@ static gboolean gail_widget_on_screen (GtkWidget *widget)
|
||||
gtk_widget_get_allocation (viewport, &viewport_allocation);
|
||||
|
||||
adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (viewport));
|
||||
visible_rect.y = adjustment->value;
|
||||
visible_rect.y = gtk_adjustment_get_value (adjustment);
|
||||
adjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (viewport));
|
||||
visible_rect.x = adjustment->value;
|
||||
visible_rect.x = gtk_adjustment_get_value (adjustment);
|
||||
visible_rect.width = viewport_allocation.width;
|
||||
visible_rect.height = viewport_allocation.height;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user