diff options
author | bseifert <none@none> | 2003-12-24 07:50:52 +0300 |
---|---|---|
committer | bseifert <none@none> | 2003-12-24 07:50:52 +0300 |
commit | 90813ee191ff6cf6c2f56a2fd69add2d6bee37a5 (patch) | |
tree | 3679a764851c4890c94386160b118b1eee443219 /windirstat/dirstatdoc.cpp | |
parent | 16c05cbc202ea903ca4909e690e0263afae70fc6 (diff) |
All treemap-related code now in CTreemap. New treemap options dialog.
Diffstat (limited to 'windirstat/dirstatdoc.cpp')
-rw-r--r-- | windirstat/dirstatdoc.cpp | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/windirstat/dirstatdoc.cpp b/windirstat/dirstatdoc.cpp index 6367bd6..cfe2187 100644 --- a/windirstat/dirstatdoc.cpp +++ b/windirstat/dirstatdoc.cpp @@ -584,46 +584,11 @@ void CDirstatDoc::SortExtensionData(CStringArray& sortedExtensions) void CDirstatDoc::SetExtensionColors(const CStringArray& sortedExtensions) { - static CArray<COLORREF, COLORREF> colors; + static CArray<COLORREF, COLORREF&> colors; if (colors.GetSize() == 0) { - if (Is256Colors()) - { - ASSERT(countof(_cushionColors) >= 6); - colors.SetSize(7); - for (int i=0; i < 6; i++) - { - colors[i]= _cushionColors[i]; - } - colors[6]= RGB(100, 100, 100); - } - else - { - colors.SetSize(countof(_cushionColors)); - - for (int i=0; i < countof(_cushionColors); i++) - { - COLORREF c= _cushionColors[i]; - - double dred= GetRValue(c) / 255.0; - double dgreen= GetGValue(c) / 255.0; - double dblue= GetBValue(c) / 255.0; - - double f= BASE_BRIGHTNESS / (dred + dgreen + dblue); - dred*= f; - dgreen*= f; - dblue*= f; - - int red = (int)(dred * 255); - int green = (int)(dgreen * 255); - int blue = (int)(dblue * 255); - - NormalizeColor(red, green, blue); - - colors[i]= RGB(red, green, blue); - } - } + CTreemap::GetDefaultPalette(colors); } for (int i=0; i < sortedExtensions.GetSize(); i++) |