Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11836/src/gui

Modified Files:
        wxllist.cpp 
Log Message:
fixed resetting text foreground colour (e.g. after URLs); style info generation 
is still broken though

Index: wxllist.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxllist.cpp,v
retrieving revision 1.168
retrieving revision 1.169
diff -b -u -2 -r1.168 -r1.169
--- wxllist.cpp 16 Jan 2006 20:32:28 -0000      1.168
+++ wxllist.cpp 8 Apr 2006 02:22:29 -0000       1.169
@@ -1885,6 +1885,6 @@
    if(weight != -1)    m_CurrentStyleInfo.weight = weight;
    if(underline != -1) m_CurrentStyleInfo.underline = underline != 0;
-   if(fg) m_CurrentStyleInfo.m_fg = *fg;
-   if(bg) m_CurrentStyleInfo.m_bg = *bg;
+   m_CurrentStyleInfo.m_fg = fg ? *fg : m_DefaultStyleInfo.m_fg;
+   m_CurrentStyleInfo.m_bg = bg ? *bg : m_DefaultStyleInfo.m_bg;
    if(enc != wxFONTENCODING_DEFAULT) m_CurrentStyleInfo.enc = enc;
    Insert(
@@ -3219,5 +3219,5 @@
    }
 
-   if(si.m_fg_valid)
+   if ( si.m_fg_valid && m_CurrentStyleInfo.m_fg != si.m_fg )
    {
       m_CurrentStyleInfo.m_fg = si.m_fg;
@@ -3225,5 +3225,11 @@
       dc.SetTextForeground(m_CurrentStyleInfo.m_fg);
    }
-   if(si.m_bg_valid)
+   else if ( m_CurrentStyleInfo.m_fg != m_DefaultStyleInfo.m_fg )
+   {
+      m_CurrentStyleInfo.m_fg = m_DefaultStyleInfo.m_fg;
+      dc.SetTextForeground(m_DefaultStyleInfo.m_fg);
+   }
+
+   if ( si.m_bg_valid && m_CurrentStyleInfo.m_bg != si.m_bg )
    {
       m_CurrentStyleInfo.m_bg = si.m_bg;
@@ -3231,4 +3237,9 @@
       dc.SetTextBackground(m_CurrentStyleInfo.m_bg);
    }
+   else if ( m_CurrentStyleInfo.m_bg != m_DefaultStyleInfo.m_bg )
+   {
+      m_CurrentStyleInfo.m_bg = m_DefaultStyleInfo.m_bg;
+      dc.SetTextBackground(m_DefaultStyleInfo.m_bg);
+   }
 }
 



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to