opaque clist column resizes



here's a little patch against gtkclist.c from the 1.1 branch to make
resizing the columns opaque. it really isn't suited for the tree yet,
since when you're resizing, the header buttons and most of the list items
get redrawn.. if we could work around that, it'd be pretty neat :)

 _        _  __     __             _ _                                  _
|        / |/ /_ __/ /_____         |       Nuke Skyjumper               |
|       /    / // /  '_/ -_)        |         "Master of the Farce"      |
|_     /_/|_/\_,_/_/\_\\__/        _|_           nuke@bayside.net       _|
--- gtkclist.c	Wed May 27 20:53:37 1998
+++ gtkclist-opaque.c	Wed May 27 20:48:06 1998
@@ -2084,8 +2084,6 @@
 			  GDK_BUTTON1_MOTION_MASK |
 			  GDK_BUTTON_RELEASE_MASK,
 			  NULL, NULL, event->time);
-
-	draw_xor_line (clist);
 	return FALSE;
       }
 
@@ -2115,10 +2113,6 @@
 	  width = new_column_width (clist, i, &x, &visible);
 	  gdk_pointer_ungrab (event->time);
 	  
-	  if (visible)
-	    draw_xor_line (clist);
-
-	  resize_column (clist, i, width);
 	  return FALSE;
 	}
 
@@ -2129,7 +2123,7 @@
 gtk_clist_motion (GtkWidget * widget,
 		  GdkEventMotion * event)
 {
-  gint i, x, visible;
+  gint i, x, width, visible;
   GtkCList *clist;
 
   g_return_val_if_fail (widget != NULL, FALSE);
@@ -2146,23 +2140,8 @@
 	  else
 	    x = event->x;
 
-	  new_column_width (clist, i, &x, &visible);
-	  /* Welcome to my hack!  I'm going to use a value of x_drage = -99999 to
-	   * indicate the the xor line is already no visible */
-	  if (!visible && clist->x_drag != -99999)
-	    {
-	      draw_xor_line (clist);
-	      clist->x_drag = -99999;
-	    }
-
-	  if (x != clist->x_drag && visible)
-	    {
-	      if (clist->x_drag != -99999)
-		draw_xor_line (clist);
-
-	      clist->x_drag = x;
-	      draw_xor_line (clist);
-	    }
+	  width = new_column_width (clist, i, &x, &visible);
+         resize_column (clist, i, width);
 	}
 
   return TRUE;


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