lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [6295] Resolve column-width issue by adding margins uncond


From: Greg Chicares
Subject: [lmi-commits] [6295] Resolve column-width issue by adding margins unconditionally
Date: Mon, 21 Sep 2015 00:51:21 +0000

Revision: 6295
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6295
Author:   chicares
Date:     2015-09-21 00:51:20 +0000 (Mon, 21 Sep 2015)
Log Message:
-----------
Resolve column-width issue by adding margins unconditionally

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/wx_table_generator.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2015-09-21 00:35:14 UTC (rev 6294)
+++ lmi/trunk/ChangeLog 2015-09-21 00:51:20 UTC (rev 6295)
@@ -36847,3 +36847,9 @@
 Adjust 20150826T1714Z fix (VZ). See:
   http://lists.nongnu.org/archive/html/lmi/2015-09/msg00012.html
 
+20150921T0051Z <address@hidden> [474]
+
+  wx_table_generator.cpp
+Resolve column-width issue by adding margins unconditionally. See:
+  http://lists.nongnu.org/archive/html/lmi/2015-09/msg00012.html
+

Modified: lmi/trunk/wx_table_generator.cpp
===================================================================
--- lmi/trunk/wx_table_generator.cpp    2015-09-21 00:35:14 UTC (rev 6294)
+++ lmi/trunk/wx_table_generator.cpp    2015-09-21 00:51:20 UTC (rev 6295)
@@ -126,14 +126,13 @@
     increase_to_if_smaller(max_header_lines_, count_lines(header));
 
     // Also increase the column width to be sufficiently wide to fit
-    // this header line (with roughly 1 em margins on either side) if it has
-    // fixed width.
+    // this header line if it has fixed width.
     if(0 != width)
         {
-        increase_to_if_smaller
-            (width
-            ,dc_.GetMultiLineTextExtent(header).x + dc_.GetTextExtent("MM").x
-            );
+        increase_to_if_smaller(width, dc_.GetMultiLineTextExtent(header).x);
+
+        // Add roughly 1 em margins on both sides.
+        width += dc_.GetTextExtent("MM").x;
         }
 
     columns_.push_back(column_info(header, width));




reply via email to

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