From fd654d1c79f48b7ef4e6e9a549108b975fa2ec0b Mon Sep 17 00:00:00 2001 From: Ruben Dashyan Date: Fri, 8 Feb 2019 14:01:19 +0100 Subject: [PATCH] [escher/scroll_view] Remove setColorsBackground Introduced in commit 37da7b95a to avoid screen tearing. Not necessary anymore since commit 0e9092d2e. --- apps/home/controller.cpp | 2 +- apps/probability/calculation_type_controller.cpp | 1 - escher/include/escher/scroll_view.h | 3 --- escher/src/expression_field.cpp | 2 -- escher/src/scroll_view.cpp | 4 ---- escher/src/scrollable_view.cpp | 1 - 6 files changed, 1 insertion(+), 12 deletions(-) diff --git a/apps/home/controller.cpp b/apps/home/controller.cpp index a4f61b7c1..f1b7bcefc 100644 --- a/apps/home/controller.cpp +++ b/apps/home/controller.cpp @@ -11,7 +11,7 @@ Controller::ContentView::ContentView(Controller * controller, SelectableTableVie { m_selectableTableView.setVerticalCellOverlap(0); m_selectableTableView.setMargins(0, k_sideMargin, k_bottomMargin, k_sideMargin); - m_selectableTableView.setColorsBackground(false); + m_selectableTableView.setBackgroundColor(KDColorWhite); static_cast(m_selectableTableView.decorator())->setBarsFrameBreadth(k_scrollBarsFrameBreadth); static_cast(m_selectableTableView.decorator())->verticalBar()->setMargin(k_indicatorMargin); } diff --git a/apps/probability/calculation_type_controller.cpp b/apps/probability/calculation_type_controller.cpp index 0f16323f4..aef5c6527 100644 --- a/apps/probability/calculation_type_controller.cpp +++ b/apps/probability/calculation_type_controller.cpp @@ -23,7 +23,6 @@ CalculationTypeController::CalculationTypeController(Responder * parentResponder m_selectableTableView.setMargins(0); m_selectableTableView.setVerticalCellOverlap(0); m_selectableTableView.setDecoratorType(ScrollView::Decorator::Type::None); - m_selectableTableView.setColorsBackground(false); } View * CalculationTypeController::view() { diff --git a/escher/include/escher/scroll_view.h b/escher/include/escher/scroll_view.h index 3a7ff7d92..c58fe512e 100644 --- a/escher/include/escher/scroll_view.h +++ b/escher/include/escher/scroll_view.h @@ -73,8 +73,6 @@ public: Decorator * decorator(); void setDecoratorType(Decorator::Type t) { m_decoratorType = t; } - void setColorsBackground(bool c) { m_colorsBackground = c; } - bool colorsBackground() const { return m_colorsBackground; } virtual void setBackgroundColor(KDColor c) { m_backgroundColor = c; } KDColor backgroundColor() const { return m_backgroundColor; } @@ -112,7 +110,6 @@ private: Decorator m_decorator; BarDecorator m_barDecorator; ArrowDecorator m_arrowDecorator; - bool m_colorsBackground; KDColor m_backgroundColor; }; diff --git a/escher/src/expression_field.cpp b/escher/src/expression_field.cpp index 8d7e26287..2fa9ee575 100644 --- a/escher/src/expression_field.cpp +++ b/escher/src/expression_field.cpp @@ -13,11 +13,9 @@ ExpressionField::ExpressionField(Responder * parentResponder, char * textBuffer, // Initialize text field m_textField.setMargins(0, k_horizontalMargin, 0, k_horizontalMargin); m_textField.setBackgroundColor(KDColorWhite); - m_textField.setColorsBackground(true); // Initialize layout field m_layoutField.setMargins(k_verticalMargin, k_horizontalMargin, k_verticalMargin, k_horizontalMargin); m_layoutField.setBackgroundColor(KDColorWhite); - m_layoutField.setColorsBackground(true); } void ExpressionField::setEditing(bool isEditing, bool reinitDraftBuffer) { diff --git a/escher/src/scroll_view.cpp b/escher/src/scroll_view.cpp index 52d2506b5..31afada97 100644 --- a/escher/src/scroll_view.cpp +++ b/escher/src/scroll_view.cpp @@ -18,7 +18,6 @@ ScrollView::ScrollView(View * contentView, ScrollViewDataSource * dataSource) : m_decorator(), m_barDecorator(), m_arrowDecorator(), - m_colorsBackground(true), m_backgroundColor(Palette::WallScreen) { assert(m_dataSource != nullptr); @@ -44,9 +43,6 @@ ScrollView::Decorator * ScrollView::decorator() { } void ScrollView::drawRect(KDContext * ctx, KDRect rect) const { - if (!m_colorsBackground) { - return; - } KDCoordinate height = bounds().height(); KDCoordinate width = bounds().width(); KDCoordinate offsetX = contentOffset().x(); diff --git a/escher/src/scrollable_view.cpp b/escher/src/scrollable_view.cpp index ea122e2b0..1faeab4c4 100644 --- a/escher/src/scrollable_view.cpp +++ b/escher/src/scrollable_view.cpp @@ -8,7 +8,6 @@ ScrollableView::ScrollableView(Responder * parentResponder, View * view, ScrollV m_manualScrollingOffset(KDPointZero) { setDecoratorType(ScrollView::Decorator::Type::None); - setColorsBackground(false); } bool ScrollableView::handleEvent(Ion::Events::Event event) {