[Aptitude-svn-commit] r3373 - in branches/aptitude-0.3/aptitude: . src/vscreen

Daniel Burrows dburrows@costa.debian.org
Tue, 07 Jun 2005 17:58:35 +0000


Author: dburrows
Date: Tue Jun  7 17:58:33 2005
New Revision: 3373

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/vscreen/fragment.cc
Log:
Fix style_fragment to compose styles in the right order.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Tue Jun  7 17:58:33 2005
@@ -1,5 +1,12 @@
 2005-06-07  Daniel Burrows  <dburrows@debian.org>
 
+	* src/vscreen/fragment.cc:
+
+	Fix the composition of styles by style_fragments: instead of
+	composing our style with the enclosing style, compose the
+	enclosing style with our style (remember, composition is
+	noncommutative).
+
 	* src/vscreen/fragment.cc, src/vscreen/fragment.h:
 
 	When generating a text fragment from a string and a style,

Modified: branches/aptitude-0.3/aptitude/src/vscreen/fragment.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/fragment.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/fragment.cc	Tue Jun  7 17:58:33 2005
@@ -106,7 +106,7 @@
   fragment_contents layout(size_t firstw, size_t restw,
 			   const style &st2)
   {
-    return contents->layout(firstw, restw, st+st2);
+    return contents->layout(firstw, restw, st2+st);
   }
 
   size_t max_width(size_t first_indent, size_t rest_indent) const