diff --git a/apps/variable_box_controller.cpp b/apps/variable_box_controller.cpp index 8b12bd092..2d812725c 100644 --- a/apps/variable_box_controller.cpp +++ b/apps/variable_box_controller.cpp @@ -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)); diff --git a/apps/variable_box_controller.h b/apps/variable_box_controller.h index 790360fbb..266d42595 100644 --- a/apps/variable_box_controller.h +++ b/apps/variable_box_controller.h @@ -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;