Files
Upsilon/apps/on_boarding/logo_view.cpp
Émilie Feral 998733db62 [on_boarding]
Change-Id: Ia1dd18c27bb9d5f727f6c90d2579c85556f17e86
2017-05-12 10:42:34 +02:00

31 lines
676 B
C++

#include "logo_view.h"
#include "logo_icon.h"
#include <assert.h>
namespace OnBoarding {
LogoView::LogoView() :
View()
{
m_logoView.setImage(ImageStore::LogoIcon);
}
void LogoView::drawRect(KDContext * ctx, KDRect rect) const {
ctx->fillRect(bounds(), KDColorWhite);
}
int LogoView::numberOfSubviews() const {
return 1;
}
View * LogoView::subviewAtIndex(int index) {
assert(index == 0);
return &m_logoView;
}
void LogoView::layoutSubviews() {
m_logoView.setFrame(KDRect((Ion::Display::Width - ImageStore::LogoIcon->width())/2, (Ion::Display::Height - ImageStore::LogoIcon->height())/2, ImageStore::LogoIcon->width(), ImageStore::LogoIcon->height()));
}
}