From 24fa8b28a9fd3ff58f85363ab2acc6351dc32e38 Mon Sep 17 00:00:00 2001 From: Ruben Dashyan Date: Fri, 28 Feb 2020 11:47:51 +0100 Subject: [PATCH] [apps/shared/sum_graph_controller] In LegendView::setSumLayout, factor m_sum.setAlignment --- apps/shared/sum_graph_controller.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/shared/sum_graph_controller.cpp b/apps/shared/sum_graph_controller.cpp index 06b8ed49a..26d487733 100644 --- a/apps/shared/sum_graph_controller.cpp +++ b/apps/shared/sum_graph_controller.cpp @@ -222,11 +222,7 @@ void SumGraphController::LegendView::setSumLayout(Step step, double start, doubl LayoutHelper::String(buffer, strlen(buffer), k_font)); } m_sum.setLayout(sumLayout); - if (step == Step::Result) { - m_sum.setAlignment(0.5f, 0.5f); - } else { - m_sum.setAlignment(0.0f, 0.5f); - } + m_sum.setAlignment(0.5f * (step == Step::Result), 0.5f); layoutSubviews(step, false); }