panel clock (kclockapplet) patch

Melchior FRANZ a8603365 at unet.univie.ac.at
Wed Nov 6 22:06:58 GMT 2002


* Helge Deller -- Wednesday 06 November 2002 22:34:
> This patch seems to work somewhat more correct and includes changes as 
> suggested in feedback by Melchior.
> 
> Comments ?

This part of the patch is wrong:

@@ -152,7 +152,7 @@ void PlainClock::forceUpdate()
 DigitalClock::DigitalClock(ClockApplet *applet, ClockSettings* settings, QWidget *parent, const char *name)
     : QLCDNumber(parent, name), ClockWidget(applet, settings)
 {
-    setFrameStyle(Panel | (_settings->showFrame() ? Sunken : 0));
+    setFrameStyle(Panel | Sunken | (_settings->showFrame() ? Box : 0));
     setMargin( 4 );
     setSegmentStyle(QLCDNumber::Flat);





This is the correct fix for the "broken frame" problem (the translation
was never reset!):


Index: clock.cpp
===================================================================
RCS file: /home/kde/kdebase/kicker/applets/clock/clock.cpp,v
retrieving revision 1.97
diff -u -3 -p -r1.97 clock.cpp
--- clock.cpp   5 Nov 2002 11:06:57 -0000       1.97
+++ clock.cpp   6 Nov 2002 21:52:43 -0000
@@ -273,6 +273,7 @@ void DigitalClock::drawContents( QPainte
     p->translate( -2, -2 );
     setUpdatesEnabled( TRUE );
     QLCDNumber::drawContents( p );
+    p->translate( +1, +1 );
 }


m.





More information about the kde-core-devel mailing list