[banshee/1.5.1-fixes: 3/56] Make the playback column cell fixed width



commit 724eb8bfceccf089aafb613a7fc0452f2059a83a
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Thu Oct 8 21:22:17 2009 -0700

    Make the playback column cell fixed width

 .../ColumnCellStatusIndicator.cs                   |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellStatusIndicator.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellStatusIndicator.cs
index 134c1f1..6eb2738 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellStatusIndicator.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellStatusIndicator.cs
@@ -40,8 +40,10 @@ using Banshee.ServiceStack;
 
 namespace Banshee.Collection.Gui
 {
-    public class ColumnCellStatusIndicator : ColumnCell
+    public class ColumnCellStatusIndicator : ColumnCell, ISizeRequestCell
     {
+        const int padding = 2;
+
         protected enum Icon : int {
             Playing,
             Paused,
@@ -73,6 +75,14 @@ namespace Banshee.Collection.Gui
         public ColumnCellStatusIndicator (string property, bool expand) : base (property, expand)
         {
             LoadPixbufs ();
+            RestrictSize = true;
+        }
+
+        public bool RestrictSize { get; set; }
+
+        public void GetWidthRange (Pango.Layout layout, out int min_width, out int max_width)
+        {
+            min_width = max_width = pixbuf_size + 2 * padding;
         }
         
         protected virtual int PixbufCount {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]