[gtk+/wip/baedert/gtkimageview: 599/625] Reset in_scale/angle_transition early
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gtkimageview: 599/625] Reset in_scale/angle_transition early
- Date: Sat, 19 Mar 2016 08:50:18 +0000 (UTC)
commit 4645ff9047069fc7e246a3275b1ef0bd98338b2e
Author: Timm Bäder <mail baedert org>
Date: Tue Feb 9 22:02:52 2016 +0100
Reset in_scale/angle_transition early
In the frameclock callbacks, we need to set them to FALSE early, so
fix_anchor picks the correct new values for scale and angle.
gtk/gtkimageview.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkimageview.c b/gtk/gtkimageview.c
index 098c34c..de47d6a 100644
--- a/gtk/gtkimageview.c
+++ b/gtk/gtkimageview.c
@@ -302,6 +302,9 @@ scale_frameclock_cb (GtkWidget *widget,
priv->visible_scale = priv->transition_start_scale + new_scale;
priv->size_valid = FALSE;
+ if (t >= 0)
+ priv->in_scale_transition = FALSE;
+
if (priv->hadjustment && priv->vadjustment)
{
GtkAllocation allocation;
@@ -321,10 +324,7 @@ scale_frameclock_cb (GtkWidget *widget,
gtk_widget_queue_resize (widget);
if (t >= 1.0)
- {
- priv->in_scale_transition = FALSE;
- return G_SOURCE_REMOVE;
- }
+ return G_SOURCE_REMOVE;
return G_SOURCE_CONTINUE;
}
@@ -364,6 +364,8 @@ angle_frameclock_cb (GtkWidget *widget,
priv->visible_angle = priv->transition_start_angle + new_angle;
priv->size_valid = FALSE;
+ if (t >= 1.0)
+ priv->in_angle_transition = FALSE;
if (priv->hadjustment && priv->vadjustment)
{
@@ -383,10 +385,7 @@ angle_frameclock_cb (GtkWidget *widget,
gtk_widget_queue_resize (widget);
if (t >= 1.0)
- {
- priv->in_angle_transition = FALSE;
- return G_SOURCE_REMOVE;
- }
+ return G_SOURCE_REMOVE;
return G_SOURCE_CONTINUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]