mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 17:50:04 +01:00
[apps] VariableBoxController: add "(x)" to function symbols
This commit is contained in:
@@ -62,8 +62,11 @@ void VariableBoxController::willDisplayCellForIndex(HighlightCell * cell, int in
|
||||
}
|
||||
ExpressionTableCellWithExpression * myCell = (ExpressionTableCellWithExpression *)cell;
|
||||
Storage::Record record = recordAtIndex(index);
|
||||
char truncatedName[SymbolAbstract::k_maxNameSize];
|
||||
char truncatedName[SymbolAbstract::k_maxNameSize+k_functionArgLength];
|
||||
size_t nameLength = SymbolAbstract::TruncateExtension(truncatedName, record.fullName(), SymbolAbstract::k_maxNameSize);
|
||||
if (m_currentPage == Page::Function) {
|
||||
nameLength += strlcpy(truncatedName+nameLength, k_functionArg, k_functionArgLength+1);
|
||||
}
|
||||
Layout symbolLayout = LayoutHelper::String(truncatedName, nameLength);
|
||||
myCell->setLayout(symbolLayout);
|
||||
myCell->setAccessoryLayout(expressionLayoutForRecord(record));
|
||||
|
||||
@@ -30,7 +30,9 @@ private:
|
||||
RootMenu,
|
||||
Expression,
|
||||
Function
|
||||
};
|
||||
};
|
||||
constexpr static int k_functionArgLength = 3;
|
||||
constexpr static const char * k_functionArg = "(x)";
|
||||
constexpr static int k_maxNumberOfDisplayedRows = 6; //240/Metric::ToolboxRowHeight
|
||||
constexpr static int k_numberOfMenuRows = 2;
|
||||
constexpr static KDCoordinate k_leafMargin = 20;
|
||||
|
||||
Reference in New Issue
Block a user