mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 15:47:11 +02:00
Fixed available width for text in widget for details on pie charts.
This commit is contained in:
parent
f775670938
commit
a8cb5419d6
1 changed files with 8 additions and 4 deletions
|
@ -69,8 +69,10 @@ void PaintShadow(QPainter &p, int radius, const QRect &r) {
|
|||
p.setOpacity(opacity * kOpacityStep);
|
||||
p.drawRoundedRect(r + QMarginsF(hOffset, 0, hOffset, 0), radius, radius);
|
||||
p.setOpacity(opacity * kOpacityStep2);
|
||||
p.drawRoundedRect(r
|
||||
+ QMarginsF(hOffset2, 0, hOffset2, 0), radius, radius);
|
||||
p.drawRoundedRect(
|
||||
r + QMarginsF(hOffset2, 0, hOffset2, 0),
|
||||
radius,
|
||||
radius);
|
||||
|
||||
p.setOpacity(opacity * kOpacityStep);
|
||||
p.drawRoundedRect(r + QMarginsF(0, 0, 0, vOffset), radius, radius);
|
||||
|
@ -123,11 +125,13 @@ void PaintDetails(
|
|||
const auto lineY = textRect.y();
|
||||
const auto valueContext = Ui::Text::PaintContext{
|
||||
.position = QPoint(rect::right(textRect) - valueWidth, lineY),
|
||||
.outerWidth = textRect.width(),
|
||||
.availableWidth = valueWidth,
|
||||
};
|
||||
const auto nameContext = Ui::Text::PaintContext{
|
||||
.position = QPoint(textRect.x(), lineY),
|
||||
.outerWidth = textRect.width() - valueWidth,
|
||||
.availableWidth = textRect.width(),
|
||||
.outerWidth = textRect.width(),
|
||||
.availableWidth = textRect.width() - valueWidth,
|
||||
};
|
||||
p.setPen(st::boxTextFg);
|
||||
name.draw(p, nameContext);
|
||||
|
|
Loading…
Add table
Reference in a new issue