Files
Upsilon/apps/shared/store_cell.cpp

27 lines
728 B
C++

#include "store_cell.h"
namespace Shared {
void StoreCell::setSeparatorRight(bool separator) {
if (m_separatorRight != separator) {
m_separatorRight = separator;
reloadCell();
}
}
void StoreCell::drawRect(KDContext * ctx, KDRect rect) const {
HideableEvenOddEditableTextCell::drawRect(ctx, rect);
// Draw the separator
if (m_separatorRight) {
ctx->fillRect(KDRect(bounds().width() - k_separatorThickness, 0, k_separatorThickness, bounds().height()), HideableEvenOddEditableTextCell::hideColor());
}
}
void StoreCell::layoutSubviews() {
KDRect boundsThis = bounds();
editableTextCell()->setFrame(KDRect(boundsThis.topLeft(), boundsThis.width() - k_separatorThickness, boundsThis.height()));
}
}