]> git.saurik.com Git - wxWidgets.git/commitdiff
Two missing #includes in image code.
authorRobert Roebling <robert@roebling.de>
Sat, 4 Dec 1999 11:56:28 +0000 (11:56 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 4 Dec 1999 11:56:28 +0000 (11:56 +0000)
  Corrected item coloring in wxListCtrl report mode (incl sample).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/listctrl/listtest.cpp
src/common/imaggif.cpp
src/common/imagpcx.cpp
src/generic/listctrl.cpp

index 3582c99cf4ef2c99d93fb310a666cfbc0026502b..d7e1acbf4bf980241c1b4b55befc7a2ec0899165 100644 (file)
@@ -287,6 +287,21 @@ void MyFrame::OnReportView(wxCommandEvent& WXUNUSED(event))
         wxSprintf(buf, _T("Item %d in column 2"), i);
         tmp = m_listCtrl->SetItem(i, 2, buf);
     }
+    
+#ifndef __WXMSW__
+    // we leave all mask fields to 0 and only change the colour
+    wxListItem first;
+    first.m_itemId = 0;
+    first.m_colour = wxBLUE;
+    m_listCtrl->SetItem( first );
+    
+    first.m_itemId = 2;
+    first.m_colour = wxLIGHT_GREY;
+    m_listCtrl->SetItem( first );
+    first.m_itemId = 3;
+    first.m_colour = wxLIGHT_GREY;
+    m_listCtrl->SetItem( first );
+#endif
 
     m_listCtrl->SetColumnWidth( 0, wxLIST_AUTOSIZE );
     m_listCtrl->SetColumnWidth( 1, wxLIST_AUTOSIZE );
index c487e75fa688e7dd29f577d0eb8aebbeba22cd47..eec1778dcbb5380df81ddad94a34a1f65ec59a98 100644 (file)
@@ -29,6 +29,7 @@
 #include "wx/gifdecod.h"
 #include "wx/wfstream.h"
 #include "wx/log.h"
+#include "wx/intl.h"
 
 #if !USE_SHARED_LIBRARIES
 IMPLEMENT_DYNAMIC_CLASS(wxGIFHandler,wxImageHandler)
index 37cf4182d1698aacec78c80d911b66f92814505c..ee9c9a0c217531deadcc5c96e951f7a1831395de 100644 (file)
@@ -30,7 +30,7 @@
 #include "wx/wfstream.h"
 #include "wx/module.h"
 #include "wx/log.h"
-
+#include "wx/intl.h"
 
 //-----------------------------------------------------------------------------
 // PCX decoding
index ec4f79d94afa882e4cea4d146e241bfdfa517fe1..7e251dbf37b7c745a59b38d1ce6147b22d2532c8 100644 (file)
@@ -609,6 +609,7 @@ void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG )
     if (m_mode == wxLC_REPORT)
     {
         wxString s;
+       wxColour *colour = (wxColour*) NULL;
         wxNode *node = m_items.First();
         while (node)
         {
@@ -622,13 +623,15 @@ void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG )
                 m_owner->GetImageSize( item->GetImage(), x, y );
                 x += item->GetX() + 5;
             }
+           if (!colour)
+               colour = item->GetColour();
             if (item->HasText())
             {
                 item->GetText( s );
                 if (hilight)
                     dc->SetTextForeground( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
                 else
-                    dc->SetTextForeground( *item->GetColour() );
+                    dc->SetTextForeground( *colour );
                 dc->DrawText( s, x, item->GetY() );
             }
             dc->DestroyClippingRegion();