commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r6155 - trunk/gnue-forms/src/uidrivers/gtk2


From: johannes
Subject: r6155 - trunk/gnue-forms/src/uidrivers/gtk2
Date: Fri, 6 Aug 2004 02:46:13 -0500 (CDT)

Author: johannes
Date: 2004-08-06 02:46:12 -0500 (Fri, 06 Aug 2004)
New Revision: 6155

Modified:
   trunk/gnue-forms/src/uidrivers/gtk2/UIdriver.py
Log:
Add 10% to the average character width


Modified: trunk/gnue-forms/src/uidrivers/gtk2/UIdriver.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/gtk2/UIdriver.py     2004-08-06 07:30:17 UTC 
(rev 6154)
+++ trunk/gnue-forms/src/uidrivers/gtk2/UIdriver.py     2004-08-06 07:46:12 UTC 
(rev 6155)
@@ -24,6 +24,7 @@
 import sys
 import string
 import types
+import math
 
 from gnue.common.apps import i18n
 from gnue.forms.uidrivers._base import Exceptions
@@ -336,6 +337,9 @@
     width  = pango.PIXELS (metrics.get_approximate_char_width ())
     height = pango.PIXELS (metrics.get_ascent () + metrics.get_descent ())
 
+    # add ten percent to the average character width
+    width  = int (math.ceil (width * 1.1))
+
   finally:
     label.destroy ()
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]