[banshee/grid] [DataViewChild] Allow relative invalidations
- From: Aaron Bockover <abock src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee/grid] [DataViewChild] Allow relative invalidations
- Date: Sat, 23 Jan 2010 19:55:27 +0000 (UTC)
commit a9fa90df71fb1b710d97b16c7b896d81c0d51a43
Author: Aaron Bockover <abockover novell com>
Date: Sat Jan 23 14:54:56 2010 -0500
[DataViewChild] Allow relative invalidations
.../Banshee.Collection.Gui/ColumnCellAlbum.cs | 7 ++++++-
.../Hyena.Gui/Hyena.Data.Gui/DataViewChild.cs | 10 ++++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
index e1a9d45..b1c28c6 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
@@ -53,7 +53,12 @@ namespace Banshee.Collection.Gui
? actor.StepDeltaPercent
: -actor.StepDeltaPercent;
actor.Target.prelight_opacity = alpha = Math.Max (0.0, Math.Min (1.0, alpha));
- actor.Target.Invalidate ();
+ actor.Target.Invalidate (new Gdk.Rectangle () {
+ X = (int)actor.Target.PaddingX,
+ Y = (int)actor.Target.PaddingY,
+ Width = (int)actor.Target.ImageSize,
+ Height = (int)actor.Target.ImageSize
+ });
return alpha > 0 && alpha < 1;
};
}
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/DataViewChild.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/DataViewChild.cs
index 2925b43..a224723 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/DataViewChild.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/DataViewChild.cs
@@ -38,7 +38,7 @@ namespace Hyena.Data.Gui
public DataViewLayout ParentLayout { get; set; }
public int ModelRowIndex { get; set; }
- public override void Invalidate (Gdk.Rectangle area)
+ protected override void OnInvalidate (Gdk.Rectangle area)
{
ParentLayout.View.QueueDirtyRegion (area);
}
@@ -130,10 +130,16 @@ namespace Hyena.Data.Gui
public abstract void Render (CellContext context);
public abstract Gdk.Size Measure ();
- public virtual void Invalidate (Gdk.Rectangle area)
+ protected virtual void OnInvalidate (Gdk.Rectangle area)
{
}
+ public void Invalidate (Gdk.Rectangle area)
+ {
+ area.Offset (Allocation.X, Allocation.Y);
+ OnInvalidate (area);
+ }
+
public void Invalidate ()
{
Invalidate (Allocation);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]