Blame view

epsilon-master/apps/on_boarding/logo_view.cpp 676 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  #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()));
  }
  
  }