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

List:       kde-pim
Subject:    Re: [Kde-pim] PATCH: Font size of kaddressbook details view
From:       Tobias Koenig <tokoe82 () yahoo ! de>
Date:       2002-10-14 18:17:34
[Download RAW message or body]

On Wed, Oct 09, 2002 at 11:50:02PM +0200, Cornelius Schumacher wrote:
Hi Cornelius,

> The attached patch fixes the problem of the unreadable fonts in the 
> details view of Kaddressbook. I don't know, if this really is the right 
> solution, but it works for me and isn't such a hack as the solution 
> Tobias proposed.
Your patch doesn't work for me.
It seems that for some magic reasons KGlobalSettings::generalFont()
returns sometimes a QFont with a defined pixelSize() and sometimes with
a defined pointSize().
The attached patch checks which size is used (have to be != -1) and it
seems to work. Could you test it one more time (remove your kaddressbookrc
first) and give me a OK for commiting?

Ciao,
Tobias
-- 
In a world without walls and fences who
needs Windows and Gates???

["look_details.diff" (text/plain)]

? look_detail.diff
Index: look_details.cpp
===================================================================
RCS file: /home/kde/kdepim/kaddressbook/details/look_details.cpp,v
retrieving revision 1.2
diff -u -b -p -r1.2 look_details.cpp
--- look_details.cpp	2002/10/11 22:18:49	1.2
+++ look_details.cpp	2002/10/14 18:13:32
@@ -60,8 +60,14 @@ KABDetailedView::KABDetailedView(QWidget
     QFont fixed=KGlobalSettings::fixedFont();
     QString gfont=general.family();
     QString ffont=fixed.family();
-    int gpointsize=general.pixelSize(); // it is a joke
+    int gpointsize=general.pixelSize();
+    if ( gpointsize == -1 )
+      gpointsize = general.pointSize();
+
     int fpointsize=fixed.pixelSize();
+    if ( fpointsize == -1 )
+      fpointsize = fixed.pointSize();
+
     epainter=new KABEntryPainter
              (Qt::black, headlineTextColor,
               useHeadlineBGColor, headlineBGColor,
@@ -405,8 +411,15 @@ void KABDetailedView::configure(KConfig 
     QFont fixed=KGlobalSettings::fixedFont();
     QString gfont=general.family();
     QString ffont=fixed.family();
-    int gpointsize=general.pixelSize(); // it is a joke
+
+    int gpointsize=general.pixelSize();
+    if ( gpointsize == -1 )
+      gpointsize = general.pointSize();
+
     int fpointsize=fixed.pixelSize();
+    if ( fpointsize == -1 )
+      fpointsize = fixed.pointSize();
+
     // -----
     bool useBGImage=true;
     config->setGroup(ConfigView);

_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/

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

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