gtk-engines r1072 - in trunk: . engines/clearlooks/src



Author: bberg
Date: Mon Feb 11 21:16:16 2008
New Revision: 1072
URL: http://svn.gnome.org/viewvc/gtk-engines?rev=1072&view=rev

Log:
2008-02-11  Benjamin Berg  <benjamin sipsolutions net>

	* engines/clearlooks/src/clearlooks_style.c:
	(clearlooks_style_draw_box):
	Add checks for vertical toolbars and menubars. These are will not be
	drawn at for now.


Modified:
   trunk/ChangeLog
   trunk/engines/clearlooks/src/clearlooks_style.c

Modified: trunk/engines/clearlooks/src/clearlooks_style.c
==============================================================================
--- trunk/engines/clearlooks/src/clearlooks_style.c	(original)
+++ trunk/engines/clearlooks/src/clearlooks_style.c	Mon Feb 11 21:16:16 2008
@@ -467,12 +467,15 @@
 	{
 		WidgetParameters params;
 		MenuBarParameters menubar;
+		gboolean horizontal;
 
 		clearlooks_set_widget_parameters (widget, style, state_type, &params);
 
 		menubar.style = clearlooks_style->menubarstyle;
 
-		if (shadow_type != GTK_SHADOW_NONE)
+		horizontal = height < 2*width;
+		/* This is not that great. Ideally we would have a nice vertical menubar. */
+		if ((shadow_type != GTK_SHADOW_NONE) && horizontal)
 			STYLE_FUNCTION(draw_menubar) (cr, colors, &params, &menubar,
 			                              x, y, width, height);
 	}
@@ -829,6 +832,7 @@
 	{
 		WidgetParameters  params;
 		ToolbarParameters toolbar;
+		gboolean horizontal;
 
 		clearlooks_set_widget_parameters (widget, style, state_type, &params);
 		clearlooks_set_toolbar_parameters (&toolbar, widget, window, x, y);
@@ -844,8 +848,10 @@
 			if (GE_IS_TOOLBAR (child))
 				gtk_widget_style_get (child, "shadow-type", &shadow_type, NULL);
 		}
-
-		if (shadow_type != GTK_SHADOW_NONE)
+		
+		horizontal = height < 2*width;
+		/* This is not that great. Ideally we would have a nice vertical toolbar. */
+		if ((shadow_type != GTK_SHADOW_NONE) && horizontal)
 			STYLE_FUNCTION(draw_toolbar) (cr, colors, &params, &toolbar, x, y, width, height);
 	}
 	else if (DETAIL ("trough"))



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