r16723 - gnucash/trunk/src/report/report-system - reduce the width of reports (#366934)

Derek Atkins warlord at cvs.gnucash.org
Tue Dec 25 20:07:04 EST 2007


Author: warlord
Date: 2007-12-25 20:07:04 -0500 (Tue, 25 Dec 2007)
New Revision: 16723
Trac: http://svn.gnucash.org/trac/changeset/16723

Modified:
   gnucash/trunk/src/report/report-system/html-acct-table.scm
Log:
reduce the width of reports (#366934)
Use   instead of extra columns.
Patch by Paul Andreassen

Modified: gnucash/trunk/src/report/report-system/html-acct-table.scm
===================================================================
--- gnucash/trunk/src/report/report-system/html-acct-table.scm	2007-12-26 00:10:03 UTC (rev 16722)
+++ gnucash/trunk/src/report/report-system/html-acct-table.scm	2007-12-26 01:07:04 UTC (rev 16723)
@@ -1029,6 +1029,11 @@
 ;; Here are some standard functions to help process gnc:html-acct-tables.
 ;; 
 
+(define (gnc:html-make-nbsps n)
+  (if (> n 0)
+      (string-append "      " (gnc:html-make-nbsps (- n 1)))
+      ""))
+
 ;; Stylesheets define the following cell styles which these functions
 ;; use: "text-cell" "total-label-cell" "number-cell"
 ;; "total-number-cell".  Row styles include "normal-row",
@@ -1065,16 +1070,15 @@
 	 (tbl-width (or table-width (+ amt-depth amt-colspan)))
 	 (row
 	  (append
-	   (gnc:html-make-empty-cells lbl-depth)  ;; padding before label
 	   (list
 	    (if label-markup                      ;; the actual label
 		(gnc:make-html-table-cell/size/markup
-		 1 lbl-colspan label-markup label)
+		 1 1 label-markup (gnc:make-html-text (gnc:html-make-nbsps lbl-depth)) label)
 		(gnc:make-html-table-cell/size
-		 1 lbl-colspan label))
+		 1 1 (gnc:make-html-text (gnc:html-make-nbsps lbl-depth)) label))
 	    )
 	   (gnc:html-make-empty-cells             ;; padding after label
-            (+ (- amt-depth (+ lbl-depth lbl-colspan))
+            (+ (- amt-depth (/ tbl-width 2))
                (if total-rule? -1 0)
                )
             )



More information about the gnucash-changes mailing list