mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-20 14:20:39 +01:00
[poincare] Change names: LayoutReference-->Layout
This commit is contained in:
@@ -66,9 +66,9 @@ SolutionsController::SolutionsController(Responder * parentResponder, EquationSt
|
||||
m_delta2Layout(),
|
||||
m_contentView(this)
|
||||
{
|
||||
m_delta2Layout = HorizontalLayoutReference(VerticalOffsetLayoutReference(CharLayoutReference('2', KDText::FontSize::Small), VerticalOffsetLayoutNode::Type::Superscript), LayoutHelper::String("-4ac", 4, KDText::FontSize::Small));
|
||||
m_delta2Layout = HorizontalLayout(VerticalOffsetLayout(CharLayout('2', KDText::FontSize::Small), VerticalOffsetLayoutNode::Type::Superscript), LayoutHelper::String("-4ac", 4, KDText::FontSize::Small));
|
||||
char deltaB[] = {Ion::Charset::CapitalDelta, '=', 'b'};
|
||||
static_cast<HorizontalLayoutReference&>(m_delta2Layout).addOrMergeChildAtIndex(LayoutHelper::String(deltaB, 3, KDText::FontSize::Small), 0, false);
|
||||
static_cast<HorizontalLayout&>(m_delta2Layout).addOrMergeChildAtIndex(LayoutHelper::String(deltaB, 3, KDText::FontSize::Small), 0, false);
|
||||
for (int i = 0; i < EquationStore::k_maxNumberOfExactSolutions; i++) {
|
||||
m_exactValueCells[i].setParentResponder(m_contentView.selectableTableView());
|
||||
}
|
||||
@@ -145,7 +145,7 @@ void SolutionsController::willDisplayCellAtLocation(HighlightCell * cell, int i,
|
||||
if (i == 0) {
|
||||
if (m_equationStore->type() == EquationStore::Type::PolynomialMonovariable && j == m_equationStore->numberOfSolutions()) {
|
||||
EvenOddExpressionCell * deltaCell = static_cast<EvenOddExpressionCell *>(cell);
|
||||
deltaCell->setLayoutReference(m_delta2Layout);
|
||||
deltaCell->setLayout(m_delta2Layout);
|
||||
} else {
|
||||
EvenOddBufferTextCell * symbolCell = static_cast<EvenOddBufferTextCell *>(cell);
|
||||
symbolCell->setFontSize(KDText::FontSize::Large);
|
||||
@@ -171,7 +171,7 @@ void SolutionsController::willDisplayCellAtLocation(HighlightCell * cell, int i,
|
||||
valueCell->setText(bufferValue);
|
||||
} else {
|
||||
Shared::ScrollableExactApproximateExpressionsCell * valueCell = static_cast<ScrollableExactApproximateExpressionsCell *>(cell);
|
||||
Poincare::LayoutReference exactLayout = m_equationStore->exactSolutionLayoutsAtIndexAreIdentical(j) ? Poincare::LayoutReference() : m_equationStore->exactSolutionLayoutAtIndex(j, true);
|
||||
Poincare::Layout exactLayout = m_equationStore->exactSolutionLayoutsAtIndexAreIdentical(j) ? Poincare::Layout() : m_equationStore->exactSolutionLayoutAtIndex(j, true);
|
||||
valueCell->setLayouts(m_equationStore->exactSolutionLayoutAtIndex(j, false), exactLayout);
|
||||
if (!exactLayout.isUninitialized()) {
|
||||
valueCell->setEqualMessage(m_equationStore->exactSolutionLayoutsAtIndexAreEqual(j) ? I18n::Message::Equal : I18n::Message::AlmostEqual);
|
||||
@@ -194,8 +194,8 @@ KDCoordinate SolutionsController::rowHeight(int j) {
|
||||
if (m_equationStore->type() == EquationStore::Type::Monovariable) {
|
||||
return k_defaultCellHeight;
|
||||
}
|
||||
Poincare::LayoutReference exactLayout = m_equationStore->exactSolutionLayoutAtIndex(j, true);
|
||||
Poincare::LayoutReference approximateLayout = m_equationStore->exactSolutionLayoutAtIndex(j, false);
|
||||
Poincare::Layout exactLayout = m_equationStore->exactSolutionLayoutAtIndex(j, true);
|
||||
Poincare::Layout approximateLayout = m_equationStore->exactSolutionLayoutAtIndex(j, false);
|
||||
KDCoordinate exactLayoutHeight = exactLayout.layoutSize().height();
|
||||
KDCoordinate approximateLayoutHeight = approximateLayout.layoutSize().height();
|
||||
KDCoordinate layoutHeight = max(exactLayout.baseline(), approximateLayout.baseline()) + max(exactLayoutHeight-exactLayout.baseline(), approximateLayoutHeight-approximateLayout.baseline());
|
||||
|
||||
Reference in New Issue
Block a user