We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e1b1a1 commit 336965dCopy full SHA for 336965d
TrafficMonitor/TaskBarDlg.cpp
@@ -509,6 +509,11 @@ void CTaskBarDlg::DisableRenderFeatureIfNecessary(CSupportedRenderEnums& ref_sup
509
510
void CTaskBarDlg::TryDrawStatusBar(IDrawCommon& drawer, const CRect& rect_bar, int usage_percent)
511
{
512
+ //限制范围
513
+ if (usage_percent > 100)
514
+ usage_percent = 100;
515
+ if (usage_percent < 0)
516
+ usage_percent = 0;
517
COLORREF graph_color = theApp.m_taskbar_data.GetUsageGraphColor();
518
CSize fill_size = CSize(rect_bar.Width() * usage_percent / 100, rect_bar.Height());
519
CRect rect_fill(rect_bar.TopLeft(), fill_size);
0 commit comments