2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Added initial support of static zoom for chart widget.

This commit is contained in:
23rd
2023-05-26 16:04:33 +03:00
committed by John Preston
parent 26b17325aa
commit e8aa55d4d8
6 changed files with 75 additions and 11 deletions

View File

@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_statistics.h"
#include "statistics/chart_horizontal_lines_data.h"
#include "statistics/statistics_common.h"
#include "ui/effects/animations.h"
#include "ui/rp_widget.h"
@@ -18,11 +19,6 @@ class ChartWidget : public Ui::RpWidget {
public:
ChartWidget(not_null<Ui::RpWidget*> parent);
struct Limits final {
float64 min = 0;
float64 max = 0;
};
void setChartData(Data::StatisticalChart chartData);
void setHeightLimits(Limits newHeight, bool animated);
@@ -44,6 +40,8 @@ private:
Limits _startFrom;
Limits _startFromH;
Limits _xPercentageLimits;
float64 _minMaxUpdateStep = 0.;
crl::time _lastHeightLimitsChanged = 0;