From 25f30507561fcc9c2d0bc6f7cc3a4e978c320d39 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 25 Jan 2011 09:18:41 +0100 Subject: Do not oversize New and Send/Receive toolbar buttons --- widgets/misc/e-menu-tool-button.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'widgets/misc/e-menu-tool-button.c') diff --git a/widgets/misc/e-menu-tool-button.c b/widgets/misc/e-menu-tool-button.c index 628fdea55d..8661effa31 100644 --- a/widgets/misc/e-menu-tool-button.c +++ b/widgets/misc/e-menu-tool-button.c @@ -99,38 +99,6 @@ menu_tool_button_update_button (GtkToolButton *tool_button) g_free (tooltip); } -static void -menu_tool_button_get_preferred_height (GtkWidget *widget, - gint *minimal_height, - gint *natural_height) -{ - GTK_WIDGET_CLASS (e_menu_tool_button_parent_class)-> - get_preferred_height (widget, minimal_height, natural_height); -} - -static void -menu_tool_button_get_preferred_width (GtkWidget *widget, - gint *minimal_width, - gint *natural_width) -{ - gint minimum_width, min_height, nat_height; - - GTK_WIDGET_CLASS (e_menu_tool_button_parent_class)-> - get_preferred_width (widget, minimal_width, natural_width); - - /* XXX This is a hack. This widget is only used for the New - * button in the main window toolbar. The New button is - * pretty important, but the word "New" is pretty short - * (in English, anyway) and this results in a small screen - * target when using a "text below item" toolbar style. - * - * We can't go hard-coding a width, but we -can- use a - * heuristic based on the toolbar button height. */ - menu_tool_button_get_preferred_height (widget, &min_height, &nat_height); - minimum_width = min_height * 2; - *minimal_width = *natural_width = MAX (minimum_width, *minimal_width); -} - static void menu_tool_button_clicked (GtkToolButton *tool_button) { @@ -147,13 +115,8 @@ menu_tool_button_clicked (GtkToolButton *tool_button) static void e_menu_tool_button_class_init (EMenuToolButtonClass *class) { - GtkWidgetClass *widget_class; GtkToolButtonClass *tool_button_class; - widget_class = GTK_WIDGET_CLASS (class); - widget_class->get_preferred_height = menu_tool_button_get_preferred_height; - widget_class->get_preferred_width = menu_tool_button_get_preferred_width; - tool_button_class = GTK_TOOL_BUTTON_CLASS (class); tool_button_class->clicked = menu_tool_button_clicked; } -- cgit v1.2.3