remove correction on x when detail is "menuitem". With the new menu look

Tue Jul  8 19:57:14 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkstyle.c (gtk_default_draw_arrow): remove correction on x
	when detail is "menuitem". With the new menu look is isn't needed
	anymore.

	* gtk/gtktoolitem.c (gtk_tool_item_toolbar_reconfigured): queue a
	resize here, so that tool items will get a chance to relayout
	themselves based on the toolbar configuration.

	change DEFAULT_SPACE_SIZE to 4 instead of 5

	* gtk/gtktoolbar.c
	Get rid of "!GTK_BIN (item)->child means separator". Separators
	are widgets in their own right

	change DEFAULT_SPACE_SIZE to 4 instead of 5

	(get_space_size): remove this function
	(toolbar_item_is_homogeneous): new function

	* gtk/gtkseparatortoolitem.c
	(gtk_separator_tool_item_size_request): new function.

Tue Jul  8 14:10:35 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtktoggletoolbutton.h: use private data, add new
	internal function _gtk_toggle_tool_button_get_button()

	* gtk/gtktoolbutton.h: move to private data

	* gtk/gtkradiotoolbutton.c, gtk/gtktoolbutton.c: updates for new
	private data.
This commit is contained in:
Soeren Sandmann
2003-07-08 18:20:45 +00:00
committed by Søren Sandmann Pedersen
parent b3b16bebcf
commit 7913e63f69
15 changed files with 364 additions and 146 deletions

View File

@ -27,7 +27,7 @@
#include "gtktoolbar.h"
/* note: keep in sync with DEFAULT_SPACE_SIZE and DEFAULT_SPACE_STYLE in gtktoolbar.c */
#define DEFAULT_SPACE_SIZE 5
#define DEFAULT_SPACE_SIZE 4
#define DEFAULT_SPACE_STYLE GTK_TOOLBAR_SPACE_LINE
#define SPACE_LINE_DIVISION 10
@ -35,6 +35,8 @@
#define SPACE_LINE_END 7
static void gtk_separator_tool_item_class_init (GtkSeparatorToolItemClass *class);
static void gtk_separator_tool_item_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static gboolean gtk_separator_tool_item_expose (GtkWidget *widget,
GdkEventExpose *event);
static void gtk_separator_tool_item_add (GtkContainer *container,
@ -115,6 +117,7 @@ gtk_separator_tool_item_class_init (GtkSeparatorToolItemClass *class)
toolitem_class = (GtkToolItemClass *)class;
widget_class = (GtkWidgetClass *)class;
widget_class->size_request = gtk_separator_tool_item_size_request;
widget_class->expose_event = gtk_separator_tool_item_expose;
container_class->add = gtk_separator_tool_item_add;
@ -127,6 +130,25 @@ gtk_separator_tool_item_add (GtkContainer *container,
g_warning("attempt to add a child to an GtkSeparatorToolItem");
}
static void
gtk_separator_tool_item_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
GtkToolItem *item = GTK_TOOL_ITEM (widget);
GtkOrientation orientation = gtk_tool_item_get_orientation (item);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
requisition->width = get_space_size (item);
requisition->height = 1;
}
else
{
requisition->height = get_space_size (item);
requisition->width = 1;
}
}
static gboolean
gtk_separator_tool_item_expose (GtkWidget *widget,
GdkEventExpose *event)
@ -143,7 +165,7 @@ gtk_separator_tool_item_expose (GtkWidget *widget,
allocation = &(widget->allocation);
orientation = gtk_tool_item_get_orientation (tool_item);
area = &(event->area);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
gtk_paint_vline (widget->style, widget->window,