add button to collapse all brush settings
This commit is contained in:
@@ -135,8 +135,11 @@
|
|||||||
<!--stroke panel-->
|
<!--stroke panel-->
|
||||||
<layout id="tpl-panel-stroke">
|
<layout id="tpl-panel-stroke">
|
||||||
<node width="250" margin="0 0 10 0" rtl="ltr">
|
<node width="250" margin="0 0 10 0" rtl="ltr">
|
||||||
<border height="30" color=".5" align="center" justify="center">
|
<border height="30" color=".5" align="center" justify="center" dir="row">
|
||||||
<text text="Brush Settings" color="1 1 1 1"/>
|
<node align="center" width="1" grow="1">
|
||||||
|
<text text="Brush Settings"/>
|
||||||
|
</node>
|
||||||
|
<button id="button-unfold-all" width="30" height="18" text="+" margin="0 5 0 0"/>
|
||||||
</border>
|
</border>
|
||||||
<border color=".3" pad="5" dir="col" width="100%">
|
<border color=".3" pad="5" dir="col" width="100%">
|
||||||
|
|
||||||
|
|||||||
@@ -574,6 +574,20 @@ void NodePanelStroke::init_controls()
|
|||||||
init_fold("colorvar");
|
init_fold("colorvar");
|
||||||
init_fold("jitter");
|
init_fold("jitter");
|
||||||
|
|
||||||
|
if (auto b = find<NodeButton>("button-unfold-all")) {
|
||||||
|
b->on_click = [this](Node*) {
|
||||||
|
static bool visible = true;
|
||||||
|
visible = !visible;
|
||||||
|
find("fold-color")->SetVisibility(visible);
|
||||||
|
find("fold-metrics")->SetVisibility(visible);
|
||||||
|
find("fold-pattern")->SetVisibility(visible);
|
||||||
|
find("fold-dualbrush")->SetVisibility(visible);
|
||||||
|
find("fold-medium")->SetVisibility(visible);
|
||||||
|
find("fold-colorvar")->SetVisibility(visible);
|
||||||
|
find("fold-jitter")->SetVisibility(visible);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
update_controls();
|
update_controls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user