Fixed available width for text in widget for point details on charts.
This commit is contained in:
parent
db97db4aba
commit
2638e54181
1 changed files with 4 additions and 2 deletions
|
|
@ -263,11 +263,13 @@ void PointDetailsWidget::paintEvent(QPaintEvent *e) {
|
||||||
const auto valueWidth = line.value.maxWidth();
|
const auto valueWidth = line.value.maxWidth();
|
||||||
const auto valueContext = Ui::Text::PaintContext{
|
const auto valueContext = Ui::Text::PaintContext{
|
||||||
.position = QPoint(rect::right(_textRect) - valueWidth, lineY),
|
.position = QPoint(rect::right(_textRect) - valueWidth, lineY),
|
||||||
|
.outerWidth = _textRect.width(),
|
||||||
|
.availableWidth = valueWidth,
|
||||||
};
|
};
|
||||||
const auto nameContext = Ui::Text::PaintContext{
|
const auto nameContext = Ui::Text::PaintContext{
|
||||||
.position = QPoint(_textRect.x(), lineY),
|
.position = QPoint(_textRect.x(), lineY),
|
||||||
.outerWidth = _textRect.width() - valueWidth,
|
.outerWidth = _textRect.width(),
|
||||||
.availableWidth = _textRect.width(),
|
.availableWidth = _textRect.width() - valueWidth,
|
||||||
};
|
};
|
||||||
p.setOpacity(line.alpha * line.alpha * _alpha);
|
p.setOpacity(line.alpha * line.alpha * _alpha);
|
||||||
p.setPen(st::boxTextFg);
|
p.setPen(st::boxTextFg);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue