Blame view

build2/epsilon-master/apps/shared/store_cell.cpp 831 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
  #include "store_cell.h"
  #include <escher/metric.h>
  
  namespace Shared {
  
  void StoreCell::setSeparatorLeft(bool separator) {
    if (m_separatorLeft != separator) {
      m_separatorLeft = separator;
      reloadCell();
    }
  }
  
  void StoreCell::drawRect(KDContext * ctx, KDRect rect) const {
    HideableEvenOddEditableTextCell::drawRect(ctx, rect);
    // Draw the separator
    KDRect separatorRect(0, 0, Metric::TableSeparatorThickness, bounds().height());
    if (m_separatorLeft) {
      ctx->fillRect(separatorRect, HideableEvenOddEditableTextCell::hideColor());
    }
  }
  
  void StoreCell::layoutSubviews() {
    KDRect boundsThis = bounds();
    editableTextCell()->setFrame(KDRect(boundsThis.left() + Metric::TableSeparatorThickness, boundsThis.top(), boundsThis.width() - Metric::TableSeparatorThickness - k_rightMargin, boundsThis.height()));
  }
  
  }