banshee r3514 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView
- From: scottp svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3514 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView
- Date: Sat, 22 Mar 2008 00:32:22 +0000 (GMT)
Author: scottp
Date: Sat Mar 22 00:32:22 2008
New Revision: 3514
URL: http://svn.gnome.org/viewvc/banshee?rev=3514&view=rev
Log:
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs:
Minor improvements to rendering. Vertical resizing is now much more
efficient, only rendering new rows that com into view as a result
of resizing (rather than rendering everything on every pass).
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs:
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs:
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs:
Minor improvements to rendering.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs Sat Mar 22 00:32:22 2008
@@ -115,7 +115,7 @@
protected virtual void OnColumnControllerUpdated ()
{
RegenerateColumnCache ();
- QueueDraw ();
+ InvalidateListView ();
}
protected virtual void OnColumnRightClicked (Column clickedColumn, int x, int y)
@@ -185,8 +185,7 @@
}
RegenerateColumnCache ();
- InvalidateHeader ();
- InvalidateList ();
+ InvalidateListView ();
}
private Column GetColumnForResizeHandle (int x)
@@ -241,7 +240,7 @@
column_controller = value;
RegenerateColumnCache ();
- QueueDraw ();
+ InvalidateListView ();
if (column_controller != null) {
column_controller.Updated += OnColumnControllerUpdatedHandler;
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs Sat Mar 22 00:32:22 2008
@@ -416,8 +416,7 @@
pressed_column_x_drag = x - pressed_column_x_offset;
- InvalidateHeader ();
- InvalidateList ();
+ InvalidateListView ();
return true;
}
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs Sat Mar 22 00:32:22 2008
@@ -91,7 +91,7 @@
Theme.DrawFrameBorder (cairo_context, Allocation);
// Now we blit the offscreen canvas onto the GdkWindow.
- GdkWindow.DrawDrawable (Style.WhiteGC, canvas1, 0, (int)vadjustment.Value % RowHeight,
+ GdkWindow.DrawDrawable (Style.BaseGC (StateType.Normal), canvas1, 0, (int)vadjustment.Value % RowHeight,
list_rendering_alloc.X, list_rendering_alloc.Y, list_rendering_alloc.Width, list_rendering_alloc.Height);
// Finally, render the dragging box and dispose of the cairo context.
@@ -439,7 +439,7 @@
cairo_context.Stroke ();
}
- public new void QueueDraw ()
+ private void InvalidateListView ()
{
InvalidateHeader ();
InvalidateList ();
@@ -455,7 +455,7 @@
if (IsRealized) {
this.render_everything |= render_everything;
GdkWindow.InvalidateRect (list_rendering_alloc, true);
- base.QueueDraw ();
+ QueueDraw ();
}
}
@@ -463,7 +463,7 @@
{
if (IsRealized) {
GdkWindow.InvalidateRect (header_rendering_alloc, true);
- base.QueueDraw ();
+ QueueDraw ();
}
}
@@ -472,7 +472,7 @@
get { return rules_hint; }
set {
rules_hint = value;
- QueueDraw ();
+ InvalidateList ();
}
}
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs Sat Mar 22 00:32:22 2008
@@ -131,10 +131,14 @@
list_interaction_alloc = list_rendering_alloc;
list_interaction_alloc.Offset (-allocation.X, -allocation.Y);
- canvas_alloc.Height = Math.Max (1, RowsInView * RowHeight);
- canvas_alloc.Width = Math.Max (1, list_rendering_alloc.Width);
+ int canvas_width = Math.Max (1, list_rendering_alloc.Width);
+ int canvas_height = Math.Max (1, RowsInView * RowHeight);
- DisposeCanvases ();
+ if (canvas_alloc.Width != canvas_width || canvas_alloc.Height != canvas_height) {
+ DisposeCanvases ();
+ canvas_alloc.Width = canvas_width;
+ canvas_alloc.Height = canvas_height;
+ }
}
private void DisposeCanvases ()
@@ -181,7 +185,7 @@
}
RegenerateColumnCache ();
- InvalidateList ();
+ InvalidateList (false);
}
private int RowsInView {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]