[Top][All Lists]

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

[lmi-commits] [lmi] master da9e57d 4/6: Improve documentation, resolving

From: Greg Chicares
Subject: [lmi-commits] [lmi] master da9e57d 4/6: Improve documentation, resolving a question or two
Date: Sun, 22 Apr 2018 14:56:59 -0400 (EDT)

branch: master
commit da9e57d11b3ea2cf44cf71b917ee8f23560d6986
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Improve documentation, resolving a question or two
 wx_table_generator.cpp | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index a0c144a..d01f19a 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -256,17 +256,18 @@ void wx_table_generator::do_compute_column_widths()
     if(total_width_ < total_fixed)
-// As originally laid out, the table is too wide. Calculate the number
-// of pixels by which it overflows--for the whole table:
+        // The fixed-width columns don't all fit with their original
+        // one-em presumptive bilateral margins. Try to make them fit
+        // by reducing the margins slightly.
+        //
+        // The number of pixels that would need to be removed is:
         auto const overflow = total_fixed - total_width_;
-// and total_fixed is width of all fixed-width columns, as originally laid out
-        // If we have only fixed columns, try to make them fit by decreasing
-        // the margins around them if this can help, assuming that we can
-        // reduce them to the extent necessary.
-        //
-        // Thus, if there's at least one "variable-width" column...
-        // ...just fail?
+        // Because fixed-width columns take more than the available
+        // horizontal space, there's no room to fit any variable-width
+        // columns, so the column-fitting problem is overconstrained.
+        // Therefore, don't even try reducing margins if there are any
+        // variable-width columns.
 // Also calculate the number of pixels by which it overflows for each column

reply via email to

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