banshee r3959 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Data.Gui



Author: abock
Date: Thu May 22 18:44:38 2008
New Revision: 3959
URL: http://svn.gnome.org/viewvc/banshee?rev=3959&view=rev

Log:
2008-05-22  Aaron Bockover  <abock gnome org>

    * src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellCheckBox.cs: Save and
    reset the bound object on motion/pointer leave to a hover object variable
    and draw the checkbox as prelit if that's set



Modified:
   trunk/banshee/Banshee.mds
   trunk/banshee/ChangeLog
   trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellCheckBox.cs

Modified: trunk/banshee/Banshee.mds
==============================================================================
--- trunk/banshee/Banshee.mds	(original)
+++ trunk/banshee/Banshee.mds	Thu May 22 18:44:38 2008
@@ -3,17 +3,14 @@
     <Configuration name="Debug" ctype="CombineConfiguration">
       <Entry build="True" name="Banshee" configuration="Debug" />
       <Entry build="True" name="libbanshee" configuration="Debug" />
-      <Entry build="True" name="tests" configuration="Default" />
     </Configuration>
   </Configurations>
   <StartMode startupentry="Banshee" single="True">
     <Execute type="None" entry="Banshee" />
     <Execute type="None" entry="libbanshee" />
-    <Execute type="None" entry="tests" />
   </StartMode>
   <Entries>
     <Entry filename="src/Banshee.mds" />
     <Entry filename="libbanshee/libbanshee.mdp" />
-    <Entry filename="tests/tests.md-nunit" />
   </Entries>
 </Combine>
\ No newline at end of file

Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellCheckBox.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellCheckBox.cs	(original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellCheckBox.cs	Thu May 22 18:44:38 2008
@@ -44,12 +44,17 @@
             int x = context.Area.X + xpad + ((cell_width - Size) / 2);
             int y = context.Area.Y + ypad + ((cell_height - Size) / 2);
             
+            if (state == StateType.Normal && last_hover_bound == BoundObjectParent) {
+                state = StateType.Prelight;
+            }
+            
             Style.PaintCheck (context.Widget.Style, context.Drawable, state, 
                 Value ? ShadowType.In : ShadowType.Out, 
                 context.Clip, context.Widget, "cellcheck", x, y, Size, Size);
         }
         
         private object last_pressed_bound;
+        private object last_hover_bound;
         
         public bool ButtonEvent (int x, int y, bool pressed, Gdk.EventButton evnt)
         {
@@ -68,12 +73,18 @@
         
         public bool MotionEvent (int x, int y, Gdk.EventMotion evnt)
         {
-            return false;
+            if (last_hover_bound == BoundObjectParent) {
+                return false;
+            }
+            
+            last_hover_bound = BoundObjectParent;
+            return true;
         }
         
         public bool PointerLeaveEvent ()
         {
-            return false;
+            last_hover_bound = null;
+            return true;
         }
         
         public void GetSize (out int width, out int height)



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