[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/kicker/applets/clock
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2005-05-11 16:40:40
Message-ID: 1115829640.862262.14626.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 412419 by aseigo:

fix for for small clocks with date only shown
by Gregorio Guidi
BUGS:86437


 M  +8 -12     trunk/KDE/kdebase/kicker/applets/clock/clock.cpp  


--- trunk/KDE/kdebase/kicker/applets/clock/clock.cpp #412418:412419
@@ -937,27 +937,23 @@
     }
 
     int shareDateHeight = 0, shareDayOfWeekHeight = 0;
-    bool dateToSide = false;
+    bool dateToSide = (h < 32);
     bool mustShowDate = showDate || (zone->zoneIndex() != 0);
     if (mustShowDate)
     {
-        if (h < 32)
+        _date->setAlignment(AlignVCenter | AlignHCenter);
+        if (!dateToSide)
         {
-            dateToSide = true;
-        }
-        else
-        {
-            // put date underneath
             shareDateHeight = _date->sizeHint().height();
         }
-
-        _date->setAlignment(AlignVCenter | AlignHCenter);
     }
-
-    if (showDayOfWeek && h >= 32)
+    if (showDayOfWeek)
     {
-        shareDayOfWeekHeight = _dayOfWeek->sizeHint().height();
         _dayOfWeek->setAlignment(AlignVCenter | AlignHCenter);
+        if (!dateToSide)
+        {
+            shareDayOfWeekHeight = _dayOfWeek->sizeHint().height();
+        }
     }
 
     int clockWidth = _clock->preferedWidthForHeight(KMAX(0, h - shareDateHeight - \
shareDayOfWeekHeight));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic