Changeset 467 for trunk/src/wx
- Timestamp:
- 09/08/15 18:40:48 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wx/wx_canvas.cc
r410 r467 63 63 } 64 64 65 static wxColor wx_log_color[] = 66 { 67 wxColor( *wxWHITE ), 68 wxColor( *wxRED ), 69 wxColor( *wxRED ), 70 wxColor( *wxRED ), 71 wxColor( *wxYELLOW ), 72 wxColor( *wxGREEN ), 73 wxColor( *wxLIGHT_GREY ), 74 wxColor( *wxLIGHT_GREY ), 75 wxColor( *wxLIGHT_GREY ), 76 wxColor( *wxLIGHT_GREY ), 77 wxColor( *wxLIGHT_GREY ), 78 }; 79 65 80 void nv::wx_log_text_ctrl_sink::log( nv::log_level level, const nv::string_view& message ) 66 81 { … … 68 83 char stamp[16]; 69 84 size_t ssize = timestamp( stamp ); 70 str << stamp << " [" << padded_level_name( level ).data() << "] " << message.data() << "\n"; 85 m_text_ctrl->SetDefaultStyle( wxTextAttr( wx_log_color[ level / 10 ] ) ); 86 str << "[" << padded_level_name( level ).data() << "] " << message.data() << "\n"; 71 87 m_text_ctrl->AppendText( str ); 72 88 }
Note: See TracChangeset
for help on using the changeset viewer.