Slightly improved code style for decimal counts.

This commit is contained in:
23rd
2024-05-21 05:22:27 +03:00
committed by John Preston
parent 030d35ea7e
commit 6336df2bd6
2 changed files with 10 additions and 9 deletions

View File

@@ -81,7 +81,7 @@ void PaintDetails(
line.name);
auto value = Ui::Text::String(
st::statisticsDetailsPopupStyle,
QString("%L1").arg(absoluteValue));
Lang::FormatCountDecimal(absoluteValue));
const auto nameWidth = name.maxWidth();
const auto valueWidth = value.maxWidth();
@@ -177,7 +177,7 @@ PointDetailsWidget::PointDetailsWidget(
const auto calculatedWidth = [&]{
const auto maxValueText = Ui::Text::String(
_textStyle,
QString("%L1").arg(maxAbsoluteValue));
Lang::FormatCountDecimal(maxAbsoluteValue));
const auto maxValueTextWidth = maxValueText.maxWidth();
auto maxNameTextWidth = 0;
@@ -284,7 +284,7 @@ void PointDetailsWidget::setXIndex(int xIndex) {
textLine.name.setText(_textStyle, dataLine.name);
textLine.value.setText(
_textStyle,
QString("%L1").arg(dataLine.y[xIndex]));
Lang::FormatCountDecimal(dataLine.y[xIndex]));
hasPositiveValues |= (dataLine.y[xIndex] > 0);
textLine.valueColor = QColor(dataLine.color);
if (_chartData.currencyRate) {