mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Fixed paint of rulers for stack chart view.
This commit is contained in:
@@ -937,7 +937,9 @@ void ChartWidget::setupChartArea() {
|
||||
return;
|
||||
}
|
||||
|
||||
_rulersView.paintRulers(p, chartRect);
|
||||
if (!_areRulersAbove) {
|
||||
_rulersView.paintRulers(p, chartRect);
|
||||
}
|
||||
|
||||
const auto context = PaintContext{
|
||||
_chartData,
|
||||
@@ -953,7 +955,9 @@ void ChartWidget::setupChartArea() {
|
||||
_chartView->paint(p, context);
|
||||
}
|
||||
|
||||
_rulersView.paintCaptionsToRulers(p, chartRect);
|
||||
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();
|
||||
|
@@ -162,7 +162,7 @@ private:
|
||||
int captionIndicesOffset = 0;
|
||||
} _bottomLine;
|
||||
|
||||
bool _useMinHeight = false;
|
||||
bool _areRulersAbove = false;
|
||||
|
||||
std::shared_ptr<LinesFilterController> _linesFilterController;
|
||||
|
||||
|
Reference in New Issue
Block a user