| 163 | } |
| 164 | |
| 165 | COLORREF CLocationView::GetBackgroundColor() |
| 166 | { |
| 167 | COLORREF clrBackground = GetDocument()->GetView(0, 0)->GetColor(COLORINDEX_WHITESPACE); |
| 168 | if (!IsColorDark(clrBackground)) |
| 169 | { |
| 170 | return RGB( |
| 171 | (std::max)(GetRValue(clrBackground) - 24, 0), |
| 172 | (std::max)(GetGValue(clrBackground) - 24, 0), |
| 173 | (std::max)(GetBValue(clrBackground) - 12, 0)); |
| 174 | } |
| 175 | return RGB( |
| 176 | (std::min)(GetRValue(clrBackground) + 20, 255), |
| 177 | (std::min)(GetGValue(clrBackground) + 20, 255), |
| 178 | (std::min)(GetBValue(clrBackground) + 32, 255)); |
| 179 | } |
| 180 | |
| 181 | /** |
| 182 | * @brief Draw custom (non-white) background. |
nothing calls this directly
no test coverage detected