mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 11:39:58 +02:00
[escher] Create a class Bordered instead of BorderedCell: this enable
non-cell view to use it as well
This commit is contained in:
@@ -6,7 +6,8 @@ static inline KDCoordinate minCoordinate(KDCoordinate x, KDCoordinate y) { retur
|
||||
static inline KDCoordinate maxCoordinate(KDCoordinate x, KDCoordinate y) { return x > y ? x : y; }
|
||||
|
||||
TableCell::TableCell(Layout layout) :
|
||||
BorderedCell(),
|
||||
Bordered(),
|
||||
HighlightCell(),
|
||||
m_layout(layout)
|
||||
{
|
||||
}
|
||||
@@ -165,9 +166,7 @@ void TableCell::layoutSubviews(bool force) {
|
||||
}
|
||||
|
||||
void TableCell::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
KDCoordinate width = bounds().width();
|
||||
KDCoordinate height = bounds().height();
|
||||
KDColor backgroundColor = isHighlighted() ? Palette::Select : KDColorWhite;
|
||||
ctx->fillRect(KDRect(k_separatorThickness, k_separatorThickness, width-2*k_separatorThickness, height-k_separatorThickness), backgroundColor);
|
||||
BorderedCell::drawRect(ctx, rect);
|
||||
}
|
||||
drawInnerRect(ctx, bounds(), backgroundColor);
|
||||
drawBorderOfRect(ctx, bounds(), Palette::GreyBright);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user