Skip to content

Commit 2b4cc56

Browse files
committed
任务栏中占用率百分比的显示始终确保在100%能完整显示,不再动态调整,避免任务栏窗口宽度频繁变化
1 parent 82cc431 commit 2b4cc56

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

TrafficMonitor/DisplayItem.cpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -355,22 +355,7 @@ CString CommonDisplayItem::GetItemValueSampleText(bool is_main_window) const
355355
case TDI_GPU_USAGE:
356356
case TDI_HDD_USAGE:
357357
{
358-
//获取当前数值
359-
int value = 0;
360-
if (item_type == TDI_CPU)
361-
value = theApp.m_cpu_usage;
362-
else if (item_type == TDI_MEMORY)
363-
value = theApp.m_memory_usage;
364-
else if (item_type == TDI_GPU_USAGE)
365-
value = theApp.m_gpu_usage;
366-
else if (item_type == TDI_HDD_USAGE)
367-
value = theApp.m_hdd_usage;
368-
369-
//当数值达到100时,使用字符串“100”作为宽度,防止显示不全
370-
if (value >= 100)
371-
sample_str = _T("100");
372-
else
373-
sample_str = _T("99");
358+
sample_str = _T("100");
374359
if (!theApp.m_taskbar_data.hide_percent)
375360
{
376361
if (theApp.m_taskbar_data.separate_value_unit_with_space)

0 commit comments

Comments
 (0)