[apps/statistics] Repare histogram view controller

Change-Id: I5d8bbf7fd3b9508a22c4eaeecc8290c68842a5ed
This commit is contained in:
Émilie Feral
2017-02-27 13:43:12 +01:00
committed by Romain Goyet
parent 4f484ec26b
commit abfebdaa81
3 changed files with 5 additions and 6 deletions

View File

@@ -65,11 +65,10 @@ bool HistogramController::handleEvent(Ion::Events::Event event) {
return true;
}
if (m_view.isMainViewSelected() && (event == Ion::Events::Left || event == Ion::Events::Right)) {
reloadBannerView();
int direction = event == Ion::Events::Left ? -1 : 1;
if (moveSelection(direction)) {
m_view.reload();
}
moveSelection(direction);
reloadBannerView();
m_view.reload();
return true;
}
return false;

View File

@@ -29,7 +29,7 @@ public:
Responder * defaultController() override;
void viewWillAppear() override;
private:
constexpr static int k_maxNumberOfBarsPerWindow = 280;
constexpr static int k_maxNumberOfBarsPerWindow = 100;
constexpr static int k_maxNumberOfCharacters = 12;
Responder * tabController() const;
void reloadBannerView();

View File

@@ -34,7 +34,7 @@ void Store::setBarWidth(float barWidth) {
if (barWidth <= 0.0f) {
return;
}
m_barWidth = barWidth;
m_barWidth = barWidth;
}
float Store::firstDrawnBarAbscissa() {