fix quick panel and stroke popup panel

This commit is contained in:
2019-05-09 21:55:23 +02:00
parent 898afe9052
commit 36fd575b96
2 changed files with 5 additions and 5 deletions

View File

@@ -1579,16 +1579,16 @@ Here's a list of what's available in this release.
<!-- PANEL QUICK -->
<layout id="tpl-panel-quick">
<border color="0 0 0 0.6" width="80" dir="col" pad="5" align="center" mouse-capture="true" shrink="1">
<node dir="row" pad="5" shrink="1" min-height="100" max-height="150">
<node dir="row" pad="5" shrink="1" min-height="100" max-height="200">
<!--size-->
<node dir="col" margin="0 4 0 0" height="100%" align="center">
<text text="Size" margin="0 0 10 0"/>
<slider-v id="quick-size" height="100%" grow="1" width="30"/>
<slider-v id="quick-size" height="200" shrink="1" width="30"/>
</node>
<!--flow-->
<node dir="col" align="center" height="100%">
<text text="Flow" margin="0 0 10 0"/>
<slider-v id="quick-flow" height="100%" grow="1" width="30"/>
<slider-v id="quick-flow" height="200" shrink="1" width="30"/>
</node>
</node>
<!--color-->

View File

@@ -243,7 +243,7 @@ void App::init_sidebar()
fp->destroy();
}
layout[main_id]->add_child(stroke);
stroke->SetSize(350, YGUndefined);
stroke->SetSize(350, glm::max(100.f, screen.y - pos.y - 50.f));
auto tick = layout[main_id]->add_child<NodeImage>();
tick->SetPositioning(YGPositionTypeAbsolute);
tick->SetSize(32, 16);
@@ -257,7 +257,7 @@ void App::init_sidebar()
stroke->m_mouse_ignore = false;
stroke->mouse_capture();
auto scroll = stroke->find<NodeScroll>("scroller");
scroll->SetHeight(glm::max(100.f, screen.y - pos.y - 200.f));
//scroll->SetHeight(glm::max(100.f, screen.y - pos.y - 200.f));
layout[main_id]->update();
stroke->on_popup_close = [this, tick](Node*) {