mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
29 lines
831 B
C++
29 lines
831 B
C++
#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()));
|
|
}
|
|
|
|
}
|
|
|