fix floating panels, save ppbr imported
This commit is contained in:
@@ -140,7 +140,7 @@
|
||||
|
||||
<!-- PANEL PRESETS -->
|
||||
<layout id="tpl-panel-brush-preset">
|
||||
<node rtl="ltr" min-width="315">
|
||||
<node rtl="ltr" min-width="100">
|
||||
<border id="notification" color=".4" align="center" justify="center" grow="2">
|
||||
<text text="No brush presets loaded."/>
|
||||
<text text="Import from Photoshop ABR files."/>
|
||||
@@ -178,7 +178,7 @@
|
||||
</node>
|
||||
</layout>
|
||||
<layout id="tpl-brush-preset">
|
||||
<button-custom width="300" height="70" margin="1" pad="5" align="center" justify="center" dir="row">
|
||||
<button-custom height="70" margin="1" pad="5" align="center" justify="center" dir="row">
|
||||
<!--<node width="30" align="center">
|
||||
<checkbox icon="data/ui/check-lock-transparency.png" width="20" height="20" pad="0"/>
|
||||
</node>-->
|
||||
|
||||
@@ -245,7 +245,10 @@ void App::init_sidebar()
|
||||
if (stroke->m_parent)
|
||||
{
|
||||
if (auto fp = dynamic_cast<NodePanelFloating*>(stroke->m_parent->m_parent))
|
||||
{
|
||||
stroke->remove_from_parent();
|
||||
fp->destroy();
|
||||
}
|
||||
}
|
||||
layout[main_id]->add_child(stroke);
|
||||
stroke->SetSize(350, glm::max(100.f, screen.y - pos.y - 50.f));
|
||||
@@ -321,7 +324,10 @@ void App::init_sidebar()
|
||||
if (layers->m_parent)
|
||||
{
|
||||
if (auto fp = dynamic_cast<NodePanelFloating*>(layers->m_parent->m_parent))
|
||||
{
|
||||
layers->remove_from_parent();
|
||||
fp->destroy();
|
||||
}
|
||||
}
|
||||
layout[main_id]->add_child(layers);
|
||||
auto tick = layout[main_id]->add_child<NodeImage>();
|
||||
@@ -769,6 +775,7 @@ void App::init_menu_tools()
|
||||
fpanel->m_class = NodePanelFloating::kClass::Presets;
|
||||
fpanel->SetHeight(300);
|
||||
fpanel->SetMinHeight(300);
|
||||
fpanel->SetMinWidth(100);
|
||||
if (!floating_presets)
|
||||
{
|
||||
floating_presets = fpanel->m_container->add_child_ref<NodePanelBrushPreset>();
|
||||
|
||||
@@ -924,6 +924,7 @@ bool NodePanelBrushPreset::import_ppbr(const std::string& path)
|
||||
pb->increment();
|
||||
}
|
||||
|
||||
save();
|
||||
pb->destroy();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -222,6 +222,7 @@ void NodePanelQuick::handle_button_brush_click(Node* button)
|
||||
tick->m_scale = { 1, 1 };
|
||||
|
||||
float hh = popup->m_container->m_children.size() > 10 ? (screen.y - 90.f) : 400.f;
|
||||
popup->SetWidth(350);
|
||||
popup->SetHeight(glm::max(hh, 400.f));
|
||||
popup->SetPositioning(YGPositionTypeAbsolute);
|
||||
popup->SetPosition(popup_pos);
|
||||
|
||||
Reference in New Issue
Block a user