mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/shared] Draw separators between series in Store data
This commit is contained in:
26
apps/shared/store_cell.cpp
Normal file
26
apps/shared/store_cell.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#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()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user