Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions CPUCoreBars/CPUCoreBars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,14 @@ inline COLORREF CCpuUsageItem::CalculateBarColor() const
if (m_usage >= 0.9) return RGB(217, 66, 53); // 红色
if (m_usage >= 0.5) return RGB(246, 182, 78); // 橙色

// 基于核心索引的颜色
if (m_core_index >= 12 && m_core_index <= 19) {
return RGB(217, 66, 53); // 红色
// 根据核心类型设置颜色
if (m_is_e_core) {
return RGB(150, 150, 75); // E-Core
}
else {
// 非 E-Core (P-Core)
return (m_core_index % 2 == 0) ? RGB(118, 202, 83) : RGB(38, 160, 218); // 偶数核心: 绿色, 奇数核心: 蓝色
}
return (m_core_index % 2 == 1) ? RGB(38, 160, 218) : RGB(118, 202, 83);
}

void CCpuUsageItem::DrawECoreSymbol(HDC hDC, const RECT& rect, bool dark_mode)
Expand Down
Loading