[apps] Cleaned useless functions for updating the title bar.

Change-Id: I119d1bd29aef1be4b65a9281d21400b81f801cc6
This commit is contained in:
Léa Saviot
2017-10-30 18:03:50 +01:00
committed by Romain Goyet
parent 6ee47d6168
commit 98f2db900c
6 changed files with 5 additions and 15 deletions

View File

@@ -78,7 +78,7 @@ void AppsContainer::suspend(bool checkIfPowerKeyReleased) {
}
bool AppsContainer::dispatchEvent(Ion::Events::Event event) {
bool alphaLockWantsRedraw = m_window.updateAlphaLock();
bool alphaLockWantsRedraw = updateAlphaLock();
bool didProcessEvent = Container::dispatchEvent(event);
@@ -163,8 +163,8 @@ void AppsContainer::shutdownDueToLowBattery() {
window()->redraw(true);
}
void AppsContainer::reloadTitleBar() {
m_window.reloadTitleBar();
bool AppsContainer::updateAlphaLock() {
return m_window.updateAlphaLock();
}
OnBoarding::UpdateController * AppsContainer::updatePopUpController() {
@@ -186,5 +186,5 @@ Timer * AppsContainer::containerTimerAtIndex(int i) {
void AppsContainer::resetShiftAlphaStatus() {
Ion::Events::setShiftAlphaStatus(Ion::Events::ShiftAlphaStatus::Default);
m_window.updateAlphaLock();
updateAlphaLock();
}

View File

@@ -41,7 +41,7 @@ public:
void refreshPreferences();
void displayExamModePopUp(bool activate);
void shutdownDueToLowBattery();
void reloadTitleBar();
bool updateAlphaLock();
OnBoarding::UpdateController * updatePopUpController();
protected:
Home::App::Snapshot * homeAppSnapshot() { return &m_homeSnapshot; }

View File

@@ -41,10 +41,6 @@ void AppsWindow::hideTitleBarView(bool hide) {
}
}
void AppsWindow::reloadTitleBar() {
m_titleBarView.reload();
}
int AppsWindow::numberOfSubviews() const {
return (m_contentView == nullptr ? 1 : 2);
}

View File

@@ -14,7 +14,6 @@ public:
void refreshPreferences();
bool updateAlphaLock();
void hideTitleBarView(bool hide);
void reloadTitleBar();
private:
constexpr static KDCoordinate k_titleBarHeight = 18;
int numberOfSubviews() const override;

View File

@@ -22,10 +22,6 @@ void TitleBarView::drawRect(KDContext * ctx, KDRect rect) const {
ctx->fillRect(KDRect(0, 0, bounds().width(), 2), Palette::YellowDark);
}
void TitleBarView::reload() {
markRectAsDirty(bounds());
}
void TitleBarView::setTitle(I18n::Message title) {
m_titleView.setMessage(title);
}

View File

@@ -10,7 +10,6 @@ class TitleBarView : public View {
public:
TitleBarView();
void drawRect(KDContext * ctx, KDRect rect) const override;
void reload();
void setTitle(I18n::Message title);
bool setChargeState(Ion::Battery::Charge chargeState);
bool setIsCharging(bool isCharging);