mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 05:40:38 +01:00
[apps/graph] Memoize baselines in functions list
This commit is contained in:
@@ -3,12 +3,6 @@
|
||||
|
||||
namespace Shared {
|
||||
|
||||
FunctionTitleCell::FunctionTitleCell(Orientation orientation) :
|
||||
EvenOddCell(),
|
||||
m_orientation(orientation)
|
||||
{
|
||||
}
|
||||
|
||||
void FunctionTitleCell::setOrientation(Orientation orientation) {
|
||||
m_orientation = orientation;
|
||||
reloadCell();
|
||||
@@ -19,6 +13,13 @@ void FunctionTitleCell::setColor(KDColor color) {
|
||||
reloadCell();
|
||||
}
|
||||
|
||||
void FunctionTitleCell::setBaseline(KDCoordinate baseline) {
|
||||
if (m_baseline != baseline) {
|
||||
m_baseline = baseline;
|
||||
reloadCell();
|
||||
}
|
||||
}
|
||||
|
||||
void FunctionTitleCell::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
if (m_orientation == Orientation::VerticalIndicator){
|
||||
ctx->fillRect(KDRect(0, 0, k_colorIndicatorThickness, bounds().height()), m_functionColor);
|
||||
|
||||
Reference in New Issue
Block a user