- Timestamp:
- Aug 8, 2019 6:51:08 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIPerformanceMonitor.cpp
r80190 r80193 39 39 const ULONG iPeriod = 1; 40 40 const int iMaximumQueueSize = 100; 41 const int iMetricSetupCount = 1 0;41 const int iMetricSetupCount = 1; 42 42 43 43 /********************************************************************************************************************************* … … 251 251 } 252 252 253 if (!m_pSubMetric || iMaximumQueueSize <= 0)253 if (!m_pSubMetric || iMaximumQueueSize <= 1) 254 254 return; 255 255 … … 262 262 if (isEnabled()) 263 263 { 264 float fBarWidth = fChartWidth / (float) iMaximumQueueSize;264 float fBarWidth = fChartWidth / (float) (iMaximumQueueSize - 1); 265 265 float fH = fChartHeight / (float)iMaximum; 266 266 if (m_fUseGradientLineColor) … … 276 276 if (!m_fUseGradientLineColor) 277 277 painter.setPen(QPen(m_dataSeriesColor[k], 2.5)); 278 279 278 for (int i = 0; i < data->size() - 1; ++i) 280 279 { 281 280 int j = i + 1; 282 281 float fHeight = fH * data->at(i); 283 float fX = width() - ((data->size() -i) * fBarWidth);282 float fX = (width() - m_iMargin) - ((data->size() -i - 1) * fBarWidth); 284 283 float fHeight2 = fH * data->at(j); 285 float fX2 = width() - ((data->size() -j) * fBarWidth);284 float fX2 = (width() - m_iMargin) - ((data->size() -j - 1) * fBarWidth); 286 285 QLineF bar(fX, height() - (fHeight + m_iMargin), fX2, height() - (fHeight2 + m_iMargin)); 287 286 painter.drawLine(bar);
Note:
See TracChangeset
for help on using the changeset viewer.