VirtualBox

Ignore:
Timestamp:
Jan 3, 2024 11:21:33 AM (12 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10501. Using color coding in all chart info labels.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.cpp

    r102746 r102747  
    17521752    {
    17531753        QString strInfo;
    1754         strInfo = QString("<b>%1</b></b><br/>%2: %3 %4<br/>%5: %6 %7")
     1754        strInfo = QString("<b>%1</b><br/><font color=\"%2\">%3: %4 %5</font><br/>%6: %7 %8")
    17551755            .arg(m_strVMExitInfoLabelTitle)
    1756             .arg(m_strVMExitLabelCurrent).arg(UITranslator::addMetricSuffixToNumber(iRate)).arg(VMExitMetric.unit())
     1756            .arg(dataColorString(m_strCPUMetricName, 0)).arg(m_strVMExitLabelCurrent).arg(UITranslator::addMetricSuffixToNumber(iRate)).arg(VMExitMetric.unit())
    17571757            .arg(m_strVMExitLabelTotal).arg(UITranslator::addMetricSuffixToNumber(uTotalVMExits)).arg(VMExitMetric.unit());
    17581758         m_infoLabels[m_strVMExitMetricName]->setText(strInfo);
     
    17931793    {
    17941794        QString strInfo;
    1795         strInfo = QString("<b>%1</b><br/>%2: %3<br/>%4: %5<br/>%6: %7").arg(m_strRAMInfoLabelTitle).arg(m_strRAMInfoLabelTotal).arg(UITranslator::formatSize(_1K * iTotalRAM, g_iDecimalCount))
    1796             .arg(m_strRAMInfoLabelFree).arg(UITranslator::formatSize(_1K * (iFreeRAM), g_iDecimalCount))
    1797             .arg(m_strRAMInfoLabelUsed).arg(UITranslator::formatSize(_1K * (iTotalRAM - iFreeRAM), g_iDecimalCount));
     1795        strInfo = QString("<b>%1</b><br/>%2: %3<br/><font color=\"%4\">%5: %6</font><br/><font color=\"%7\">%8: %9</font>")
     1796            .arg(m_strRAMInfoLabelTitle)
     1797            .arg(m_strRAMInfoLabelTotal).arg(UITranslator::formatSize(_1K * iTotalRAM, g_iDecimalCount))
     1798            .arg(dataColorString(m_strCPUMetricName, 1)).arg(m_strRAMInfoLabelFree).arg(UITranslator::formatSize(_1K * (iFreeRAM), g_iDecimalCount))
     1799            .arg(dataColorString(m_strCPUMetricName, 0)).arg(m_strRAMInfoLabelUsed).arg(UITranslator::formatSize(_1K * (iTotalRAM - iFreeRAM), g_iDecimalCount));
    17981800        m_infoLabels[m_strRAMMetricName]->setText(strInfo);
    17991801    }
     
    19461948    resetNetworkInfoLabel();
    19471949    resetDiskIOInfoLabel();
     1950    resetRAMInfoLabel();
    19481951}
    19491952
     
    21752178    {
    21762179        QString strInfo;
    2177         strInfo = QString("<b>%1</b><br/>%2: %3<br/>%4: %5<br/>%6: %7").arg(m_strRAMInfoLabelTitle)
     2180        strInfo = QString("<b>%1</b><br/>%2: %3<br/><font color=\"%4\">%5: %6</font><br/><font color=\"%7\">%8: %9</font>")
     2181            .arg(m_strRAMInfoLabelTitle)
    21782182            .arg(m_strRAMInfoLabelTotal).arg(UITranslator::formatSize(_1K * m_iTotalRAM, g_iDecimalCount))
    2179             .arg(m_strRAMInfoLabelFree).arg(UITranslator::formatSize(_1K * (m_iTotalRAM - iUsedRAM), g_iDecimalCount))
    2180             .arg(m_strRAMInfoLabelUsed).arg(UITranslator::formatSize(_1K * iUsedRAM, g_iDecimalCount));
     2183            .arg(dataColorString(m_strCPUMetricName, 1)).arg(m_strRAMInfoLabelFree).arg(UITranslator::formatSize(_1K * (m_iTotalRAM - iUsedRAM), g_iDecimalCount))
     2184            .arg(dataColorString(m_strCPUMetricName, 0)).arg(m_strRAMInfoLabelUsed).arg(UITranslator::formatSize(_1K * iUsedRAM, g_iDecimalCount));
    21812185        m_infoLabels[m_strRAMMetricName]->setText(strInfo);
    21822186    }
     
    22462250        QString strInfo;
    22472251
    2248         strInfo = QString("<b>%1</b></b><br/><font color=\"%2\">%3: %4</font>")
     2252        strInfo = QString("<b>%1</b></b><br/><font>%2: %3</font>")
    22492253            .arg(m_strCPUInfoLabelTitle)
    2250             .arg(dataColorString(m_strCPUMetricName, 0))
    22512254            .arg(m_strCPUInfoLabelGuest).arg("---");
    22522255
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