VirtualBox

Changeset 80193 in vbox for trunk/src


Ignore:
Timestamp:
Aug 8, 2019 6:51:08 AM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref: 9510: Correcting x coordinates of data points

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIPerformanceMonitor.cpp

    r80190 r80193  
    3939const ULONG iPeriod = 1;
    4040const int iMaximumQueueSize = 100;
    41 const int iMetricSetupCount = 10;
     41const int iMetricSetupCount = 1;
    4242
    4343/*********************************************************************************************************************************
     
    251251    }
    252252
    253     if (!m_pSubMetric || iMaximumQueueSize <= 0)
     253    if (!m_pSubMetric || iMaximumQueueSize <= 1)
    254254        return;
    255255
     
    262262    if (isEnabled())
    263263    {
    264         float fBarWidth = fChartWidth / (float) iMaximumQueueSize;
     264        float fBarWidth = fChartWidth / (float) (iMaximumQueueSize - 1);
    265265        float fH = fChartHeight / (float)iMaximum;
    266266        if (m_fUseGradientLineColor)
     
    276276            if (!m_fUseGradientLineColor)
    277277                painter.setPen(QPen(m_dataSeriesColor[k], 2.5));
    278 
    279278            for (int i = 0; i < data->size() - 1; ++i)
    280279            {
    281280                int j = i + 1;
    282281                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);
    284283                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);
    286285                QLineF bar(fX, height() - (fHeight + m_iMargin), fX2, height() - (fHeight2 + m_iMargin));
    287286                painter.drawLine(bar);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette