Rework sliding algorithm. - No more weird jumping when items are dragged

Mon Nov 24 01:47:10 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	Rework sliding algorithm.
	- No more weird jumping when items are dragged off and added to
	the toolbar,
	- More natural item movement

	* gtk/gtktoolbar.c (gtk_toolbar_size_allocate): Many changes. This
	function is now responsible for calculating intermediate positions
	during item sliding. It is also responsible for starting sliding
	if items disappear.  Also turn off expanding when there is an
	overflow menu.
	(gtk_toolbar_begin_sliding, stop_sliding): New functions.
	(slide_idle_handler): New function. All the sliding is now done by
	gtk_toolbar_size_allocate(), so the idle handler now just checks
	if there is more sliding to be done.
	(compute_intermediate_allocation, position): new functions
	calculating intermediate steps in the slide animations. The new
	animation algorithm uses a constant speed instead of a constant
	must-be-finished-within time.
	(struct _ToolbarContent): use
	GtkAllocation goal_allocation; and
	GtkAllocation start_allocation; instead of
	gint start/goal_width;

	* gtk/gtktoolitem.c (gtk_tool_item_set_tooltip): fix typo in
	documentation
This commit is contained in:
Soeren Sandmann
2003-11-24 01:01:43 +00:00
committed by Søren Sandmann Pedersen
parent d17dc738e2
commit 2e98304e9b
7 changed files with 428 additions and 190 deletions

View File

@ -787,7 +787,7 @@ gtk_tool_item_real_set_tooltip (GtkToolItem *tool_item,
* @tool_item: a #GtkToolItem:
* @tooltips: The #GtkTooltips object to be used
* @tip_text: text to be used as tooltip text for @tool_item
* @tip_private: text to be used as rpivate tooltip text
* @tip_private: text to be used as private tooltip text
*
* Sets the #GtkTooltips object to be used for @tool_item, the
* text to be displayed as tooltip on the item and the private text