forked from AuroraMiddleware/gtk
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master See merge request GNOME/gtk!1957
This commit is contained in:
commit
0dc384265c
@ -695,6 +695,17 @@
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Adapt to coordinate API changes</title>
|
||||
<para>
|
||||
A number of APIs that are accepting or returning coordinates have
|
||||
been changed from ints to doubles: gtk_widget_translate_coordinates(),
|
||||
gtk_fixed_put(), gtk_fixed_move(). This change is mostly transparent,
|
||||
except for cases where out parameters are involved: you need to
|
||||
pass double* now, instead of int*.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Adapt to GtkStyleContext API changes</title>
|
||||
<para>
|
||||
|
@ -226,8 +226,8 @@ gtk_fixed_new (void)
|
||||
void
|
||||
gtk_fixed_put (GtkFixed *fixed,
|
||||
GtkWidget *widget,
|
||||
gint x,
|
||||
gint y)
|
||||
double x,
|
||||
double y)
|
||||
{
|
||||
GtkFixedPrivate *priv = gtk_fixed_get_instance_private (fixed);
|
||||
GtkFixedLayoutChild *child_info;
|
||||
@ -261,26 +261,16 @@ gtk_fixed_put (GtkFixed *fixed,
|
||||
void
|
||||
gtk_fixed_get_child_position (GtkFixed *fixed,
|
||||
GtkWidget *widget,
|
||||
int *x,
|
||||
int *y)
|
||||
double *x,
|
||||
double *y)
|
||||
{
|
||||
GtkFixedPrivate *priv = gtk_fixed_get_instance_private (fixed);
|
||||
GtkFixedLayoutChild *child_info;
|
||||
float pos_x = 0.f, pos_y = 0.f;
|
||||
GskTransform *transform;
|
||||
|
||||
g_return_if_fail (GTK_IS_FIXED (fixed));
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_if_fail (x != NULL);
|
||||
g_return_if_fail (y != NULL);
|
||||
g_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (fixed));
|
||||
|
||||
child_info = GTK_FIXED_LAYOUT_CHILD (gtk_layout_manager_get_layout_child (priv->layout, widget));
|
||||
transform = gtk_fixed_layout_child_get_transform (child_info);
|
||||
gsk_transform_to_translate (transform, &pos_x, &pos_y);
|
||||
|
||||
*x = floorf (pos_x);
|
||||
*y = floorf (pos_y);
|
||||
gtk_widget_translate_coordinates (widget, GTK_WIDGET (fixed), 0, 0, x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -350,8 +340,8 @@ gtk_fixed_get_child_transform (GtkFixed *fixed,
|
||||
void
|
||||
gtk_fixed_move (GtkFixed *fixed,
|
||||
GtkWidget *widget,
|
||||
gint x,
|
||||
gint y)
|
||||
double x,
|
||||
double y)
|
||||
{
|
||||
GtkFixedPrivate *priv = gtk_fixed_get_instance_private (fixed);
|
||||
GtkFixedLayoutChild *child_info;
|
||||
|
@ -67,21 +67,21 @@ GtkWidget * gtk_fixed_new (void);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_fixed_put (GtkFixed *fixed,
|
||||
GtkWidget *widget,
|
||||
gint x,
|
||||
gint y);
|
||||
double x,
|
||||
double y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_fixed_remove (GtkFixed *fixed,
|
||||
GtkWidget *widget);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_fixed_move (GtkFixed *fixed,
|
||||
GtkWidget *widget,
|
||||
gint x,
|
||||
gint y);
|
||||
double x,
|
||||
double y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_fixed_get_child_position (GtkFixed *fixed,
|
||||
GtkWidget *widget,
|
||||
gint *x,
|
||||
gint *y);
|
||||
double *x,
|
||||
double *y);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_fixed_set_child_transform (GtkFixed *fixed,
|
||||
|
@ -387,9 +387,8 @@ testdata = [
|
||||
'sizegroups-basics.css',
|
||||
'sizegroups-basics.ui',
|
||||
'sizegroups-basics.ref.ui',
|
||||
# this one triggers pango assertion in ci
|
||||
#'sizegroups-evolution-identity-page.ui',
|
||||
#'sizegroups-evolution-identity-page.ref.ui',
|
||||
'sizegroups-evolution-identity-page.ui',
|
||||
'sizegroups-evolution-identity-page.ref.ui',
|
||||
'sizegroups-get-preferred-null.ui',
|
||||
'sizegroups-get-preferred-null.ref.ui',
|
||||
'statusbar-remove-all.ref.ui',
|
||||
@ -433,8 +432,7 @@ testdata = [
|
||||
|
||||
# These need to be fixed but the issue hasn't been tracked down.
|
||||
xfails = [
|
||||
# see above
|
||||
#'sizegroups-evolution-identity-page.ui',
|
||||
'sizegroups-evolution-identity-page.ui',
|
||||
# these depend on details of text layout
|
||||
'label-sizing.ui',
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user