Browse Source

Rename new Widget methods. Add Rogan3PSWhite fg/bg test.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
87eeb02f5c
9 changed files with 121 additions and 452 deletions
  1. +8
    -0
      include/componentlibrary.hpp
  2. +1
    -0
      include/svg.hpp
  3. +1
    -1
      include/widget/SvgWidget.hpp
  4. +10
    -3
      include/widget/Widget.hpp
  5. +31
    -0
      res/ComponentLibrary/Rogan3PSWhite-bg.svg
  6. +31
    -0
      res/ComponentLibrary/Rogan3PSWhite-fg.svg
  7. +31
    -443
      res/ComponentLibrary/Rogan3PSWhite.svg
  8. +6
    -3
      src/widget/SvgWidget.cpp
  9. +2
    -2
      src/widget/Widget.cpp

+ 8
- 0
include/componentlibrary.hpp View File

@@ -341,6 +341,14 @@ struct Rogan3PSGreen : Rogan {
struct Rogan3PSWhite : Rogan {
Rogan3PSWhite() {
setSvg(Svg::load(asset::system("res/ComponentLibrary/Rogan3PSWhite.svg")));

widget::SvgWidget* bg = new widget::SvgWidget;
bg->setSvg(Svg::load(asset::system("res/ComponentLibrary/Rogan3PSWhite-bg.svg")));
fb->addChildBelow(bg, tw);

widget::SvgWidget* fg = new widget::SvgWidget;
fg->setSvg(Svg::load(asset::system("res/ComponentLibrary/Rogan3PSWhite-fg.svg")));
fb->addChildAbove(fg, tw);
}
};



+ 1
- 0
include/svg.hpp View File

@@ -11,6 +11,7 @@
namespace rack {


/** Arbitrary DPI, standardized for Rack. */
static const float SVG_DPI = 75.f;
static const float MM_PER_IN = 25.4f;



+ 1
- 1
include/widget/SvgWidget.hpp View File

@@ -11,7 +11,7 @@ namespace widget {
struct SvgWidget : Widget {
std::shared_ptr<Svg> svg;

/** Sets the box size to the svg image size */
/** Sets the box size to the SVG image size */
void wrap();

/** Sets and wraps the SVG */


+ 10
- 3
include/widget/Widget.hpp View File

@@ -99,14 +99,21 @@ struct Widget : WeakBase {
return NULL;
}

/** Checks if the given widget is a child of `this` widget.
*/
bool hasChild(Widget* child);
/** Adds widget to list of children.
/** Adds widget to the top of the children.
Gives ownership of widget to this widget instance.
*/
void addChild(Widget* child);
/** Adds widget to the bottom of the children.
*/
void addChildBottom(Widget* child);
void addChildBefore(Widget* child, Widget* sibling);
void addChildAfter(Widget* child, Widget* sibling);
/** Adds widget directly below another widget.
The sibling widget must already be a child of `this` widget.
*/
void addChildBelow(Widget* child, Widget* sibling);
void addChildAbove(Widget* child, Widget* sibling);
/** Removes widget from list of children if it exists.
Does not delete widget but transfers ownership to caller
*/


+ 31
- 0
res/ComponentLibrary/Rogan3PSWhite-bg.svg View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="51.84375px" height="51.83984px" viewBox="0 0 51.84375 51.83984" enable-background="new 0 0 51.84375 51.83984"
xml:space="preserve">
<g id="fixed_bg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer1" inkscape:cx="45.320924" inkscape:cy="41.671628" inkscape:document-units="mm" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="1434" inkscape:window-maximized="0" inkscape:window-width="1274" inkscape:window-x="1280" inkscape:window-y="0" inkscape:zoom="5.6" pagecolor="#ffffff" showgrid="false" units="px">
</sodipodi:namedview>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="25.92185" y1="0" x2="25.92185" y2="51.8437">
<stop offset="0" style="stop-color:#FFFBFD"/>
<stop offset="1" style="stop-color:#000000"/>
</linearGradient>
<circle fill="url(#SVGID_1_)" cx="25.92185" cy="25.92185" r="25.92185"/>
</g>
</g>
<g id="anim" display="none">
<g display="inline">
<circle fill="none" cx="25.92185" cy="25.92185" r="25.92185"/>
<polygon fill="#333333" points="25.92185,1.6 31.4729,18.68437 49.43646,18.68437 34.90363,29.24309 40.45468,46.32745
25.92185,35.76873 11.38902,46.32745 16.94007,29.24309 2.40724,18.68437 20.3708,18.68437 "/>
</g>
</g>
<g id="fixed_fg" display="none">
<g display="inline">
<circle fill="none" cx="25.92185" cy="25.92185" r="25.92185"/>
<rect x="19.8687" y="19.86677" fill="#F2F2F2" width="12.1063" height="12.1063"/>
</g>
</g>
</svg>

+ 31
- 0
res/ComponentLibrary/Rogan3PSWhite-fg.svg View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="51.84375px" height="51.83984px" viewBox="0 0 51.84375 51.83984" enable-background="new 0 0 51.84375 51.83984"
xml:space="preserve">
<g id="fixed_bg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" display="none">
<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer1" inkscape:cx="45.320924" inkscape:cy="41.671628" inkscape:document-units="mm" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="1434" inkscape:window-maximized="0" inkscape:window-width="1274" inkscape:window-x="1280" inkscape:window-y="0" inkscape:zoom="5.6" pagecolor="#ffffff" showgrid="false" units="px">
</sodipodi:namedview>
<g display="inline">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="25.92185" y1="0" x2="25.92185" y2="51.8437">
<stop offset="0" style="stop-color:#FFFBFD"/>
<stop offset="1" style="stop-color:#000000"/>
</linearGradient>
<circle fill="url(#SVGID_1_)" cx="25.92185" cy="25.92185" r="25.92185"/>
</g>
</g>
<g id="anim" display="none">
<g display="inline">
<circle fill="none" cx="25.92185" cy="25.92185" r="25.92185"/>
<polygon fill="#333333" points="25.92185,1.6 31.4729,18.68437 49.43646,18.68437 34.90363,29.24309 40.45468,46.32745
25.92185,35.76873 11.38902,46.32745 16.94007,29.24309 2.40724,18.68437 20.3708,18.68437 "/>
</g>
</g>
<g id="fixed_fg">
<g>
<circle fill="none" cx="25.92185" cy="25.92185" r="25.92185"/>
<rect x="19.8687" y="19.86677" fill="#F2F2F2" width="12.1063" height="12.1063"/>
</g>
</g>
</svg>

+ 31
- 443
res/ComponentLibrary/Rogan3PSWhite.svg View File

@@ -1,443 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="18.289322mm"
height="18.287943mm"
viewBox="0 0 18.289322 18.287945"
version="1.1"
id="svg15246"
sodipodi:docname="Rogan3PSWhite.svg"
inkscape:version="0.92.2 5c3e80d, 2017-08-06">
<defs
id="defs15240">
<clipPath
id="clip89">
<rect
y="0"
x="0"
width="18"
height="19"
id="rect4864" />
</clipPath>
<clipPath
id="clip90">
<path
inkscape:connector-curvature="0"
d="m 0.898438,0.128906 h 16.25 v 17.882813 h -16.25 z m 0,0"
id="path4861" />
</clipPath>
<mask
id="mask44">
<g
style="filter:url(#alpha)"
id="g4858"
transform="matrix(0.26458333,0,0,0.26458333,89.358789,128.57765)">
<rect
x="0"
y="0"
width="3052.8701"
height="3351.5"
style="fill:#000000;fill-opacity:0.14999402;stroke:none"
id="rect4856" />
</g>
</mask>
<filter
id="alpha"
filterUnits="objectBoundingBox"
x="0"
y="0"
width="1"
height="1">
<feColorMatrix
type="matrix"
in="SourceGraphic"
values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"
id="feColorMatrix4149" />
</filter>
<clipPath
id="clipPath17821">
<rect
y="0"
x="0"
width="18"
height="19"
id="rect17819" />
</clipPath>
<clipPath
id="clipPath17825">
<path
inkscape:connector-curvature="0"
d="m 0.898438,0.128906 h 16.25 v 17.882813 h -16.25 z m 0,0"
id="path17823" />
</clipPath>
<clipPath
id="clip87">
<rect
y="0"
x="0"
width="24"
height="26"
id="rect4848" />
</clipPath>
<clipPath
id="clip88">
<path
inkscape:connector-curvature="0"
d="m 0.683594,0.921875 h 22.679687 v 24.9375 H 0.683594 Z m 0,0"
id="path4845" />
</clipPath>
<mask
id="mask43">
<g
style="filter:url(#alpha)"
id="g4842"
transform="matrix(0.26458333,0,0,0.26458333,89.358789,128.57765)">
<rect
x="0"
y="0"
width="3052.8701"
height="3351.5"
style="fill:#000000;fill-opacity:0.14999402;stroke:none"
id="rect4840" />
</g>
</mask>
<filter
id="filter17836"
filterUnits="objectBoundingBox"
x="0"
y="0"
width="1"
height="1">
<feColorMatrix
type="matrix"
in="SourceGraphic"
values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"
id="feColorMatrix17834" />
</filter>
<clipPath
id="clipPath17840">
<rect
y="0"
x="0"
width="24"
height="26"
id="rect17838" />
</clipPath>
<clipPath
id="clipPath17844">
<path
inkscape:connector-curvature="0"
d="m 0.683594,0.921875 h 22.679687 v 24.9375 H 0.683594 Z m 0,0"
id="path17842" />
</clipPath>
<clipPath
id="clip95">
<rect
y="0"
x="0"
width="18"
height="18"
id="rect4912" />
</clipPath>
<clipPath
id="clip96">
<path
inkscape:connector-curvature="0"
d="M 0.140625,0.140625 H 17.199219 V 17.199219 H 0.140625 Z m 0,0"
id="path4909" />
</clipPath>
<mask
id="mask47">
<g
style="filter:url(#alpha-3)"
id="g4906"
transform="matrix(0.26458333,0,0,0.26458333,88.611154,119.19859)">
<rect
x="0"
y="0"
width="3052.8701"
height="3351.5"
style="fill:#000000;fill-opacity:0.33000201;stroke:none"
id="rect4904" />
</g>
</mask>
<filter
id="alpha-3"
filterUnits="objectBoundingBox"
x="0"
y="0"
width="1"
height="1">
<feColorMatrix
type="matrix"
in="SourceGraphic"
values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"
id="feColorMatrix4149-6" />
</filter>
<clipPath
id="clipPath18541">
<rect
y="0"
x="0"
width="18"
height="18"
id="rect18539" />
</clipPath>
<clipPath
id="clipPath18545">
<path
inkscape:connector-curvature="0"
d="M 0.140625,0.140625 H 17.199219 V 17.199219 H 0.140625 Z m 0,0"
id="path18543" />
</clipPath>
<clipPath
id="clip93">
<rect
y="0"
x="0"
width="22"
height="24"
id="rect4896" />
</clipPath>
<clipPath
id="clip94">
<path
inkscape:connector-curvature="0"
d="M 0.0390625,0.0390625 H 21.300781 V 23.421875 H 0.0390625 Z m 0,0"
id="path4893" />
</clipPath>
<mask
id="mask46">
<g
style="filter:url(#alpha-3)"
id="g4890"
transform="matrix(0.26458333,0,0,0.26458333,88.611154,119.19859)">
<rect
x="0"
y="0"
width="3052.8701"
height="3351.5"
style="fill:#000000;fill-opacity:0.14999402;stroke:none"
id="rect4888" />
</g>
</mask>
<filter
id="filter18556"
filterUnits="objectBoundingBox"
x="0"
y="0"
width="1"
height="1">
<feColorMatrix
type="matrix"
in="SourceGraphic"
values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"
id="feColorMatrix18554" />
</filter>
<clipPath
id="clipPath18560">
<rect
y="0"
x="0"
width="22"
height="24"
id="rect18558" />
</clipPath>
<clipPath
id="clipPath18564">
<path
inkscape:connector-curvature="0"
d="M 0.0390625,0.0390625 H 21.300781 V 23.421875 H 0.0390625 Z m 0,0"
id="path18562" />
</clipPath>
<clipPath
id="clip91">
<rect
y="0"
x="0"
width="29"
height="32"
id="rect4880" />
</clipPath>
<clipPath
id="clip92">
<path
inkscape:connector-curvature="0"
d="M 0.507812,0.5 H 28.855469 V 31.679688 H 0.507812 Z m 0,0"
id="path4877" />
</clipPath>
<mask
id="mask45">
<g
style="filter:url(#alpha-3)"
id="g4874"
transform="matrix(0.26458333,0,0,0.26458333,88.611154,119.19859)">
<rect
x="0"
y="0"
width="3052.8701"
height="3351.5"
style="fill:#000000;fill-opacity:0.14999402;stroke:none"
id="rect4872" />
</g>
</mask>
<filter
id="filter18575"
filterUnits="objectBoundingBox"
x="0"
y="0"
width="1"
height="1">
<feColorMatrix
type="matrix"
in="SourceGraphic"
values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"
id="feColorMatrix18573" />
</filter>
<clipPath
id="clipPath18579">
<rect
y="0"
x="0"
width="29"
height="32"
id="rect18577" />
</clipPath>
<clipPath
id="clipPath18583">
<path
inkscape:connector-curvature="0"
d="M 0.507812,0.5 H 28.855469 V 31.679688 H 0.507812 Z m 0,0"
id="path18581" />
</clipPath>
<clipPath
id="clip202">
<rect
y="0"
x="0"
width="18"
height="18"
id="rect5795" />
</clipPath>
<clipPath
id="clip203">
<path
inkscape:connector-curvature="0"
d="M 0.855469,0.140625 H 17.914062 V 17.199219 H 0.855469 Z m 0,0"
id="path5792" />
</clipPath>
<mask
id="mask104">
<g
style="filter:url(#alpha-7)"
id="g5789"
transform="matrix(0.26458333,0,0,0.26458333,74.416306,97.613551)">
<rect
x="0"
y="0"
width="3052.8701"
height="3351.5"
style="fill:#000000;fill-opacity:0.33000201;stroke:none"
id="rect5787" />
</g>
</mask>
<filter
id="alpha-7"
filterUnits="objectBoundingBox"
x="0"
y="0"
width="1"
height="1">
<feColorMatrix
type="matrix"
in="SourceGraphic"
values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"
id="feColorMatrix4149-5" />
</filter>
<clipPath
id="clipPath18765">
<rect
y="0"
x="0"
width="18"
height="18"
id="rect18763" />
</clipPath>
<clipPath
id="clipPath18769">
<path
inkscape:connector-curvature="0"
d="M 0.855469,0.140625 H 17.914062 V 17.199219 H 0.855469 Z m 0,0"
id="path18767" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6"
inkscape:cx="45.320924"
inkscape:cy="41.671628"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1274"
inkscape:window-height="1434"
inkscape:window-x="1280"
inkscape:window-y="0"
inkscape:window-maximized="0"
units="px"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata15243">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-46.461124,-86.558387)">
<path
inkscape:connector-curvature="0"
id="path7561"
d="m 64.750446,95.701674 c 0,5.050506 -4.095531,9.144656 -9.144663,9.144656 -5.049131,0 -9.144659,-4.09415 -9.144659,-9.144656 0,-5.049135 4.095528,-9.143287 9.144659,-9.143287 5.049132,0 9.144663,4.094152 9.144663,9.143287"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" />
<path
inkscape:connector-curvature="0"
id="path7563"
d="m 61.155832,95.701674 c 0,3.06475 -2.484604,5.550736 -5.55074,5.550736 -3.064757,0 -5.549357,-2.485986 -5.549357,-5.550736 0,-3.06476 2.4846,-5.549363 5.549357,-5.549363 3.066136,0 5.55074,2.484603 5.55074,5.549363"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" />
<path
inkscape:connector-curvature="0"
id="path7565"
d="m 62.972087,95.701674 c 0,4.06935 -3.297647,7.366986 -7.365616,7.366986 -4.067968,0 -7.366991,-3.297636 -7.366991,-7.366986 0,-4.066589 3.299023,-7.365615 7.366991,-7.365615 4.067969,0 7.365616,3.299026 7.365616,7.365615 z m 0,0"
style="fill:none;stroke:#636363;stroke-width:0.29999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7567"
d="m 56.311339,86.588705 c -0.232886,-0.01792 -0.468531,-0.0303 -0.705556,-0.0303 -0.2384,0 -0.472665,0.01242 -0.705555,0.0303 v 4.43177 h 1.411111 z m 0,0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" />
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="51.84375px" height="51.83984px" viewBox="0 0 51.84375 51.83984" enable-background="new 0 0 51.84375 51.83984"
xml:space="preserve">
<g id="fixed_bg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" display="none">
<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer1" inkscape:cx="45.320924" inkscape:cy="41.671628" inkscape:document-units="mm" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="1434" inkscape:window-maximized="0" inkscape:window-width="1274" inkscape:window-x="1280" inkscape:window-y="0" inkscape:zoom="5.6" pagecolor="#ffffff" showgrid="false" units="px">
</sodipodi:namedview>
<g display="inline">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="25.92185" y1="0" x2="25.92185" y2="51.8437">
<stop offset="0" style="stop-color:#FFFBFD"/>
<stop offset="1" style="stop-color:#000000"/>
</linearGradient>
<circle fill="url(#SVGID_1_)" cx="25.92185" cy="25.92185" r="25.92185"/>
</g>
</g>
<g id="anim">
<g>
<circle fill="none" cx="25.92185" cy="25.92185" r="25.92185"/>
<polygon fill="#333333" points="25.92185,1.6 31.4729,18.68437 49.43646,18.68437 34.90363,29.24309 40.45468,46.32745
25.92185,35.76873 11.38902,46.32745 16.94007,29.24309 2.40724,18.68437 20.3708,18.68437 "/>
</g>
</g>
<g id="fixed_fg" display="none">
<g display="inline">
<circle fill="none" cx="25.92185" cy="25.92185" r="25.92185"/>
<rect x="19.8687" y="19.86677" fill="#F2F2F2" width="12.1063" height="12.1063"/>
</g>
</g>
</svg>

+ 6
- 3
src/widget/SvgWidget.cpp View File

@@ -21,9 +21,12 @@ void SvgWidget::setSvg(std::shared_ptr<Svg> svg) {
}

void SvgWidget::draw(const DrawArgs& args) {
if (svg && svg->handle) {
svgDraw(args.vg, svg->handle);
}
if (!svg)
return;
if (!svg->handle)
return;

svgDraw(args.vg, svg->handle);
}




+ 2
- 2
src/widget/Widget.cpp View File

@@ -177,7 +177,7 @@ void Widget::addChildBottom(Widget* child) {
}


void Widget::addChildBefore(Widget* child, Widget* sibling) {
void Widget::addChildBelow(Widget* child, Widget* sibling) {
assert(child);
assert(!child->parent);
auto it = std::find(children.begin(), children.end(), sibling);
@@ -191,7 +191,7 @@ void Widget::addChildBefore(Widget* child, Widget* sibling) {
}


void Widget::addChildAfter(Widget* child, Widget* sibling) {
void Widget::addChildAbove(Widget* child, Widget* sibling) {
assert(child);
assert(!child->parent);
auto it = std::find(children.begin(), children.end(), sibling);


Loading…
Cancel
Save