Index: ChangeLog
===================================================================
--- ChangeLog	(revision 11151)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2008-06-29  Marek Paska  <paskma@gmail.com>
+
+	* gnome-panel/panel-widget.c: Use size hints only for applet width, not height.
+	Fix bug #513347
+
 2008-06-17  Vincent Untz  <vuntz@gnome.org>
 
 	* configure.in: post-release bump to 2.23.5.
Index: gnome-panel/panel-widget.c
===================================================================
--- gnome-panel/panel-widget.c	(revision 11151)
+++ gnome-panel/panel-widget.c	(working copy)
@@ -1428,8 +1428,13 @@
 
 				ad->min_cells = ad->cells;
 			} else {
-				ad->cells = ad->size_hints [ad->size_hints_len - 1];
-				ad->min_cells = ad->size_hints [ad->size_hints_len - 1];
+				if(panel->orient == GTK_ORIENTATION_HORIZONTAL) {
+					/* For horizontal orientation we have size hints */
+					ad->cells = ad->size_hints [ad->size_hints_len - 1];
+				} else {
+					ad->cells = chreq.height;
+				}
+				ad->min_cells = ad->cells;
 			}
 
 			ad->constrained = ad->pos;
