Commit a3312c75 authored by Jan Koester's avatar Jan Koester
Browse files

test

parent 3a58fa85
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -355,7 +355,7 @@ extern "C" {
                addField("direction", "Direction", "select", nullptr, "desktop", mkOpts({"vertical","horizontal"}));
                addField("align_items", "Align Items", "select", nullptr, "all",
                         mkOpts({"", "flex-start","center","flex-end","stretch","baseline"}));
                addField("shape_divider_type", "Shape Divider", "select", nullptr, "desktop", mkOpts({"none","wave","oval"}), "simple");
                addField("shape_divider_type", "Shape Divider", "select", nullptr, "desktop", mkOpts({"none","wave","oval","banana"}), "simple");
                addField("shape_divider_position", "Shape Divider Position", "select", nullptr, "desktop", mkOpts({"bottom","top","both"}), "simple");
                addField("shape_divider_color", "Shape Divider Color", "color_var", nullptr, "desktop", nullptr, "simple");
                addField("shape_divider_height", "Shape Divider Height", "text", "80px", "desktop");
@@ -1180,7 +1180,7 @@ extern "C" {
                    std::string css = shadowCss(boxShadow, boxShadowColor);
                    if (!css.empty()) style += " box-shadow: " + css + ";";
                }
                bool hasShapeDivider = (shapeDividerType == "wave" || shapeDividerType == "oval");
                bool hasShapeDivider = (shapeDividerType == "wave" || shapeDividerType == "oval" || shapeDividerType == "banana");
                if (hasShapeDivider) {
                    style += " position: relative;";
                }
@@ -1204,8 +1204,10 @@ extern "C" {
                        path = "M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,"
                               "512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34"
                               "C989.49,25,1113,44.11,1200,89.66V0Z";
                    } else { // oval
                    } else if (shapeDividerType == "oval") {
                        path = "M0,0Q600,100,1200,0V120H0Z";
                    } else { // banana
                        path = "M0,90C200,10,500,10,700,50C900,90,1000,20,1200,40V120H0Z";
                    }

                    auto emitDivider = [&](const std::string &pos) {