Changeset 92512 in vbox
- Timestamp:
- Nov 19, 2021 4:21:50 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.cpp
r92511 r92512 163 163 QString m_strAreaChartToggleActionLabel; 164 164 bool m_fDrawCurenValueIndicators; 165 /** The width of the right margin in characters. */ 166 int m_iRightMarginCharWidth; 165 167 }; 166 168 … … 183 185 , m_fIsAreaChartAllowed(false) 184 186 , m_fDrawCurenValueIndicators(true) 187 , m_iRightMarginCharWidth(10) 185 188 { 186 189 m_axisFont = font(); … … 194 197 m_dataSeriesColor[1] = QColor(0, 0, 200, 255); 195 198 196 m_iMarginLeft = 3 * QFontMetrics (m_axisFont).averageCharWidth();197 m_iMarginRight = 9 * QFontMetrics(m_axisFont).averageCharWidth();199 m_iMarginLeft = 3 * QFontMetricsF(m_axisFont).averageCharWidth(); 200 m_iMarginRight = m_iRightMarginCharWidth * QFontMetricsF(m_axisFont).averageCharWidth(); 198 201 m_iMarginTop = 0.3 * qApp->QApplication::style()->pixelMetric(QStyle::PM_LayoutTopMargin); 199 202 m_iMarginBottom = QFontMetrics(m_axisFont).height(); … … 510 513 quint64 iValue = (iYSubAxisCount + 1 - i) * (iMaximum / (float) (iYSubAxisCount + 1)); 511 514 QString strValue = YAxisValueLabel(iValue); 512 painter.drawText(width() - 0.9 * m_iMarginRight, iTextY, strValue); 515 /* Leave space of one character between the text and chart rectangle: */ 516 painter.drawText(width() - (m_iRightMarginCharWidth - 1) * QFontMetricsF(m_axisFont).averageCharWidth(), iTextY, strValue); 513 517 } 514 518
Note:
See TracChangeset
for help on using the changeset viewer.

