[banshee/grid] [ListView] Start to support text in grid layout
- From: Aaron Bockover <abock src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee/grid] [ListView] Start to support text in grid layout
- Date: Thu, 17 Dec 2009 04:06:17 +0000 (UTC)
commit 9b8d0a99160619f53fa9593fb7e79db37497ee67
Author: Aaron Bockover <abockover novell com>
Date: Wed Dec 16 23:14:02 2009 -0500
[ListView] Start to support text in grid layout
.../Banshee.Collection.Gui/ColumnCellAlbum.cs | 29 +++++++++++++-------
1 files changed, 19 insertions(+), 10 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
index 4e56128..98a18bb 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
@@ -89,19 +89,22 @@ namespace Banshee.Collection.Gui
// int image_render_size = is_default ? image.Height : (int)cellHeight - 8;
int image_render_size = actual_image_size;
- int x = LayoutStyle == DataViewLayoutStyle.Grid
- ? ((int)cellWidth - image_render_size) / 2
- : image_spacing;
- int y = ((int)cellHeight - image_render_size) / 2;
+ int x = 0;
+ int y = 0;
+
+ if (LayoutStyle != DataViewLayoutStyle.Grid) {
+ x = image_spacing;
+ y = ((int)cellHeight - image_render_size) / 2;
+ } else {
+ x = image_spacing;
+ y = image_spacing;
+ // x = ((int)cellWidth - image_render_size) / 2
+ }
ArtworkRenderer.RenderThumbnail (context.Context, image, false, x, y,
image_render_size, image_render_size, true, context.Theme.Context.Radius,
image == null, new Color (0.8, 0.8, 0.8));
- if (LayoutStyle == DataViewLayoutStyle.Grid) {
- return;
- }
-
int fl_width = 0, fl_height = 0, sl_width = 0, sl_height = 0;
Cairo.Color text_color = context.Theme.Colors.GetWidgetColor (GtkColorClass.Text, state);
text_color.A = 0.75;
@@ -126,8 +129,14 @@ namespace Banshee.Collection.Gui
}
// Calculate the layout positioning
- x = ((int)cellHeight - x) + 10;
- y = (int)((cellHeight - (fl_height + sl_height)) / 2);
+
+ if (LayoutStyle == DataViewLayoutStyle.Grid) {
+ x = image_spacing;
+ y = 100 + image_spacing;
+ } else {
+ x = ((int)cellHeight - x) + 10;
+ y = (int)((cellHeight - (fl_height + sl_height)) / 2);
+ }
// Render the second line first since we have that state already
if (!String.IsNullOrEmpty (album.ArtistName)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]