Changeset 85444 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 23, 2020 6:42:00 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.cpp
r85413 r85444 305 305 void UIChart::retranslateUi() 306 306 { 307 m_strGAWarning = QApplication::translate("UIVMInformationDialog", " No guest additions! This metric requires guest additions to work properly.");307 m_strGAWarning = QApplication::translate("UIVMInformationDialog", "This metric requires guest additions to work."); 308 308 m_strResetActionLabel = QApplication::translate("UIVMInformationDialog", "Reset"); 309 309 m_strPieChartToggleActionLabel = QApplication::translate("UIVMInformationDialog", "Show Pie Chart"); … … 552 552 { 553 553 painter.setPen(Qt::NoPen); 554 painter.setBrush(QColor( 60, 60, 60, 80));555 painter.drawRect( QRect(0, 0, width(), height()));554 painter.setBrush(QColor(255, 255, 255, 150)); 555 painter.drawRect(m_lineChartRect); 556 556 painter.setPen(QColor(20, 20, 20, 180)); 557 557 QFont font = painter.font(); 558 int iFontSize = 64; 559 do { 560 font.setPixelSize(iFontSize); 561 --iFontSize; 562 }while(QFontMetrics(font).width(m_strGAWarning) >= m_lineChartRect.width()); 558 563 font.setBold(true); 559 /** @todo make this size dynamic. aka. autoscale the font. */560 font.setPixelSize(16);561 564 painter.setFont(font); 562 painter.drawText( 2 * m_iMarginLeft, 15 * m_iMarginTop, m_strGAWarning);565 painter.drawText(m_lineChartRect, m_strGAWarning); 563 566 } 564 567
Note:
See TracChangeset
for help on using the changeset viewer.