[f-spot] Always update ImageView adjustments when scaling.
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [f-spot] Always update ImageView adjustments when scaling.
- Date: Fri, 20 Nov 2009 09:49:53 +0000 (UTC)
commit efb922e278ac33bb4b3edfd69c94a318b7f5a574
Author: Wojciech Dzierżanowski <wojciech dzierzanowski gmail com>
Date: Fri Nov 20 10:47:13 2009 +0100
Always update ImageView adjustments when scaling.
Fixes bgo #595770.
src/Widgets/ImageView.cs | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/Widgets/ImageView.cs b/src/Widgets/ImageView.cs
index c6ba5c4..8a9db32 100644
--- a/src/Widgets/ImageView.cs
+++ b/src/Widgets/ImageView.cs
@@ -406,16 +406,6 @@ namespace FSpot.Widgets
GdkWindow.MoveResize (allocation.X, allocation.Y, allocation.Width, allocation.Height);
}
- Hadjustment.PageSize = Math.Min (scaled_width, allocation.Width);
- Hadjustment.PageIncrement = scaled_width * .9;
- Hadjustment.StepIncrement = 32;
- Hadjustment.Lower = 0;
-
- Vadjustment.PageSize = Math.Min (scaled_height, allocation.Height);
- Vadjustment.PageIncrement = scaled_height * .9;
- Vadjustment.StepIncrement = 32;
- Vadjustment.Lower = 0;
-
if (XOffset > Hadjustment.Upper - Hadjustment.PageSize)
ScrollTo ((int)(Hadjustment.Upper - Hadjustment.PageSize), YOffset, false);
if (YOffset > Vadjustment.Upper - Vadjustment.PageSize)
@@ -770,8 +760,18 @@ namespace FSpot.Widgets
scaled_height = (uint)Math.Floor (height * Zoom + .5);
}
+ Hadjustment.PageSize = Math.Min (scaled_width, Allocation.Width);
+ Hadjustment.PageIncrement = scaled_width * .9;
+ Hadjustment.StepIncrement = 32;
Hadjustment.Upper = scaled_width;
+ Hadjustment.Lower = 0;
+
+ Vadjustment.PageSize = Math.Min (scaled_height, Allocation.Height);
+ Vadjustment.PageIncrement = scaled_height * .9;
+ Vadjustment.StepIncrement = 32;
Vadjustment.Upper = scaled_height;
+ Vadjustment.Lower = 0;
+
}
event EventHandler AdjustmentsChanged;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]