--- /tmp/clock.c	2006-01-15 18:09:14.042043311 +0100
+++ clock.c	2006-01-15 20:00:29.411170741 +0100
@@ -41,6 +41,7 @@
 
 #include "config.h"
 
+#include <stdlib.h>
 #include <stdio.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -1658,16 +1659,16 @@
 
 	cd->orient = panel_applet_get_orient (PANEL_APPLET (cd->applet));
 
+	cd->size = panel_applet_get_size (PANEL_APPLET (cd->applet));
+
 	/* Initialize label orientation */
-	if (cd->orient == PANEL_APPLET_ORIENT_LEFT)
+	if (cd->orient == PANEL_APPLET_ORIENT_LEFT && cd->size<48 )
 		gtk_label_set_angle (GTK_LABEL (cd->clockw), 270);
-	else if (cd->orient == PANEL_APPLET_ORIENT_RIGHT)
+	else if (cd->orient == PANEL_APPLET_ORIENT_RIGHT && cd->size<48)
 		gtk_label_set_angle (GTK_LABEL (cd->clockw), 90);
 	else
 		gtk_label_set_angle (GTK_LABEL (cd->clockw), 0);
 
-	cd->size = panel_applet_get_size (PANEL_APPLET (cd->applet));
-
 	g_signal_connect (G_OBJECT(clock), "destroy",
 			  G_CALLBACK (destroy_clock),
 			  cd);
@@ -1688,9 +1689,9 @@
 {
         cd->orient = orient;
         
-        if (cd->orient == PANEL_APPLET_ORIENT_LEFT)
+        if (cd->orient == PANEL_APPLET_ORIENT_LEFT && cd->size<48)
                 gtk_label_set_angle (GTK_LABEL (cd->clockw), 270);
-        else if (cd->orient == PANEL_APPLET_ORIENT_RIGHT)
+        else if (cd->orient == PANEL_APPLET_ORIENT_RIGHT && cd->size<48)
                 gtk_label_set_angle (GTK_LABEL (cd->clockw), 90);
         else
                 gtk_label_set_angle (GTK_LABEL (cd->clockw), 0);
