Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion loader/src/ui/nodes/MDTextArea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ bool MDTextArea::init(std::string str, CCSize const& size) {
m_impl->m_scrollLayer->setTouchEnabled(true);

this->addChild(m_impl->m_scrollLayer);

this->updateLabel();

return true;
Expand Down Expand Up @@ -499,6 +499,9 @@ struct MDParser {
renderer->breakLine();
s_breakListLine = false;
}
auto cursor = renderer->getCursorPos();
auto indent = renderer->getCurrentIndent();
renderer->moveCursor({ indent, cursor.y });
renderer->pushOpacity(renderer->getCurrentOpacity() / 2);
auto lidetail = static_cast<MD_BLOCK_LI_DETAIL*>(detail);
if (s_isOrderedList) {
Expand All @@ -509,6 +512,8 @@ struct MDParser {
renderer->renderString("• ");
}
renderer->popOpacity();
auto markerWidth = renderer->getCursorPos().x - indent;
renderer->pushIndent(markerWidth);
s_breakListLine = true;
}
break;
Expand Down Expand Up @@ -618,6 +623,7 @@ struct MDParser {

case MD_BLOCKTYPE::MD_BLOCK_LI:
{
renderer->popIndent();
}
break;

Expand Down
2 changes: 1 addition & 1 deletion loader/src/ui/nodes/TextRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ void TextRenderer::breakLine(float incY) {
}
if (h > y) y = h;
m_cursor.y -= y;
m_cursor.x = m_origin.x;
m_cursor.x = m_origin.x + this->getCurrentIndent();
}

float TextRenderer::adjustLineAlignment() {
Expand Down
Loading