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

List:       kde-commits
Subject:    branches/kdepim/enterprise/kdepim/kresources/kolab/knotes
From:       Allen Winter <winter () kde ! org>
Date:       2010-03-29 14:57:00
Message-ID: 20100329145700.95503AC883 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1108671 by winterz:

no more black-on-black Kolab notes
MERGE: trunk,4.4


 M  +20 -4     note.cpp  


--- branches/kdepim/enterprise/kdepim/kresources/kolab/knotes/note.cpp #1108670:1108671
@@ -184,11 +184,27 @@
 {
   KolabBase::setFields( journal );
 
-  // TODO: background and foreground
   setSummary( journal->summary() );
-  setBackgroundColor( journal->customProperty( "KNotes", "BgColor" ) );
-  setForegroundColor( journal->customProperty( "KNotes", "FgColor" ) );
-  setRichText( journal->customProperty( "KNotes", "RichText" ) == "true" );
+
+  QString property = journal->customProperty( "KNotes", "BgColor" );
+  if ( !property.isNull() ) {
+    setBackgroundColor( property );
+  } else {
+    setBackgroundColor( "yellow" );
+  }
+  property = journal->customProperty( "KNotes", "FgColor" );
+  if ( !property.isNull() ) {
+    setForegroundColor( property );
+  } else {
+    setForegroundColor( "black" );
+  }
+
+  property = journal->customProperty( "KNotes", "RichText" );
+  if ( !property.isNull() ) {
+    setRichText( property == "true" ? true : false );
+  } else {
+    setRichText( "false" );
+  }
 }
 
 void Note::saveTo( KCal::Journal* journal )
[prev in list] [next in list] [prev in thread] [next in thread] 

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