Commit f6ac64e5 authored by Jan Köster's avatar Jan Köster
Browse files

test

parent b131f373
Loading
Loading
Loading
Loading
+17 −3
Changes for editor/widgets/container/container.cpp: 17 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -1156,7 +1156,7 @@ extern "C" {
                        path = "M0,0Q600,100,1200,0V120H0Z";
                    }

                    std::string dividerStyle = "position: absolute; left: 0; width: 100%; overflow: hidden;"
                    std::string dividerStyle = "position: absolute; left: 0; width: 100%; max-height: 100%; overflow: hidden;"
                                                " line-height: 0; pointer-events: none;";
                    dividerStyle += (shapeDividerPosition == "top") ? " top: 0;" : " bottom: 0;";
                    if (!shapeDividerHeight.empty()) dividerStyle += " height: " + shapeDividerHeight + ";";
@@ -1292,18 +1292,32 @@ extern "C" {
                    el.appendChild(cssStyle);
                }

                // Content and children paint into a positioned wrapper when a shape
                // divider is present, so they stack above it — a position:absolute
                // sibling otherwise paints over static content regardless of DOM order.
                libhtmlpp::HtmlElement contentWrap("div");
                libhtmlpp::HtmlElement *contentTarget = &cnt;
                if (hasShapeDivider) {
                    contentWrap.setAttribute("style", "position: relative; z-index: 1;");
                    contentTarget = &contentWrap;
                }

                // Placeholder: Add content if any
                if (!content.empty()) {
                    cnt.appendChild(libhtmlpp::TextElement(content.c_str()));
                    contentTarget->appendChild(libhtmlpp::TextElement(content.c_str()));
                }

                // Recursively render children
                const EditPlugin *cur = child;
                while (cur) {
                    cur->Render(cnt);
                    cur->Render(*contentTarget);
                    cur = cur->nextElement(); // Changed to use the base class's accessor
                }

                if (hasShapeDivider) {
                    cnt.appendChild(contentWrap);
                }

                el.appendChild(cnt);
            }

+17 −3
Changes for editor/widgets/section/section.cpp: 17 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -950,7 +950,7 @@ extern "C" {
                        path = "M0,0Q600,100,1200,0V120H0Z";
                    }

                    std::string dividerStyle = "position: absolute; left: 0; width: 100%; overflow: hidden;"
                    std::string dividerStyle = "position: absolute; left: 0; width: 100%; max-height: 100%; overflow: hidden;"
                                                " line-height: 0; pointer-events: none;";
                    dividerStyle += (shapeDividerPosition == "top") ? " top: 0;" : " bottom: 0;";
                    if (!shapeDividerHeight.empty()) dividerStyle += " height: " + shapeDividerHeight + ";";
@@ -1062,18 +1062,32 @@ extern "C" {
                    el.appendChild(cssStyle);
                }

                // Content and children paint into a positioned wrapper when a shape
                // divider is present, so they stack above it — a position:absolute
                // sibling otherwise paints over static content regardless of DOM order.
                libhtmlpp::HtmlElement contentWrap("div");
                libhtmlpp::HtmlElement *contentTarget = §
                if (hasShapeDivider) {
                    contentWrap.setAttribute("style", "position: relative; z-index: 1;");
                    contentTarget = &contentWrap;
                }

                // Content text
                if (!content.empty()) {
                    sect.appendChild(libhtmlpp::TextElement(content.c_str()));
                    contentTarget->appendChild(libhtmlpp::TextElement(content.c_str()));
                }

                // Recursively render children
                const EditPlugin *cur = child;
                while (cur) {
                    cur->Render(sect);
                    cur->Render(*contentTarget);
                    cur = cur->nextElement();
                }

                if (hasShapeDivider) {
                    sect.appendChild(contentWrap);
                }

                el.appendChild(sect);
            }