minor refactor

This commit is contained in:
MihailRis
2025-04-26 23:03:02 +03:00
parent d2b4e096ae
commit cefa26b497
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -287,7 +287,7 @@ static std::wstring parse_inner_text(
) {
std::wstring text = L"";
if (element.size() == 1) {
std::string source = element.sub(0).attr("#").getText();
std::string source = element.sub(0).getInnerText();
util::trim(source);
text = util::str2wstr_utf8(source);
if (text[0] == '@') {
@@ -387,7 +387,7 @@ static std::shared_ptr<UINode> read_button(
std::shared_ptr<Button> button;
auto& elements = element.getElements();
if (!elements.empty() && elements[0]->getTag() != "#") {
if (!elements.empty() && elements[0]->isText()) {
auto inner = reader.readUINode(*elements.at(0));
if (inner != nullptr) {
button = std::make_shared<Button>(gui, inner, padding);