[shared] Add a margin to ScrollableExactApproximateExpressionsCell

This commit is contained in:
Émilie Feral
2018-06-01 16:41:42 +02:00
parent 24f201a20d
commit 36d058caec
2 changed files with 4 additions and 1 deletions

View File

@@ -12,9 +12,11 @@ ScrollableExactApproximateExpressionsCell::ScrollableExactApproximateExpressions
void ScrollableExactApproximateExpressionsCell::setHighlighted(bool highlight) {
m_view.evenOddCell()->setHighlighted(highlight);
reloadScroll();
}
void ScrollableExactApproximateExpressionsCell::setEven(bool even) {
EvenOddCell::setEven(even);
m_view.evenOddCell()->setEven(even);
}
@@ -39,7 +41,7 @@ View * ScrollableExactApproximateExpressionsCell::subviewAtIndex(int index) {
}
void ScrollableExactApproximateExpressionsCell::layoutSubviews() {
m_view.setFrame(bounds());
m_view.setFrame(KDRect(k_margin,k_margin, bounds().width()-2*k_margin, bounds().height()-2*k_margin));
}
}

View File

@@ -23,6 +23,7 @@ public:
return this;
}
void didBecomeFirstResponder() override;
constexpr static KDCoordinate k_margin = 5;
private:
int numberOfSubviews() const override;
View * subviewAtIndex(int index) override;