2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Fixed paint of rulers for stack chart view.

This commit is contained in:
23rd
2023-10-05 14:58:18 +03:00
committed by John Preston
parent fcdd7ecd61
commit d16cab30d4
2 changed files with 12 additions and 3 deletions

View File

@@ -937,7 +937,9 @@ void ChartWidget::setupChartArea() {
return;
}
if (!_areRulersAbove) {
_rulersView.paintRulers(p, chartRect);
}
const auto context = PaintContext{
_chartData,
@@ -953,7 +955,9 @@ void ChartWidget::setupChartArea() {
_chartView->paint(p, context);
}
if (!_areRulersAbove) {
_rulersView.paintCaptionsToRulers(p, chartRect);
}
{
[[maybe_unused]] const auto o = ScopedPainterOpacity(
p,
@@ -979,6 +983,10 @@ void ChartWidget::setupChartArea() {
_details.widget->xIndex(),
detailsAlpha);
}
if (_areRulersAbove) {
_rulersView.paintRulers(p, chartRect);
_rulersView.paintCaptionsToRulers(p, chartRect);
}
p.setPen(st::windowSubTextFg);
PaintBottomLine(
@@ -1445,6 +1453,7 @@ void ChartWidget::setChartData(
_chartView = CreateChartView(type);
_chartView->setLinesFilterController(_linesFilterController);
_rulersView.setChartData(_chartData, type, _linesFilterController);
_areRulersAbove = (type == ChartViewType::Stack);
if (_chartData.isFooterHidden) {
_footer->hide();

View File

@@ -162,7 +162,7 @@ private:
int captionIndicesOffset = 0;
} _bottomLine;
bool _useMinHeight = false;
bool _areRulersAbove = false;
std::shared_ptr<LinesFilterController> _linesFilterController;