mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
function title cells and function expression cells Change-Id: Idbdae4975c8ed83a023c781dc14929b8c2053bb0
26 lines
646 B
C++
26 lines
646 B
C++
#include "function_title_cell.h"
|
|
#include <assert.h>
|
|
|
|
namespace Shared {
|
|
|
|
FunctionTitleCell::FunctionTitleCell(Orientation orientation, KDText::FontSize size) :
|
|
EvenOddCell(),
|
|
m_orientation(orientation)
|
|
{
|
|
}
|
|
|
|
void FunctionTitleCell::setColor(KDColor color) {
|
|
m_functionColor = color;
|
|
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);
|
|
} else {
|
|
ctx->fillRect(KDRect(0, 0, bounds().width(), k_colorIndicatorThickness), m_functionColor);
|
|
}
|
|
}
|
|
|
|
}
|