scale brush size on high dpi
This commit is contained in:
@@ -486,6 +486,7 @@ bool NodePanelBrushPreset::save()
|
||||
i.m_stencil_thumb_path_len = b->m_pattern_thumb_path.size();
|
||||
i.m_tip_color = b->m_tip_color;
|
||||
i.m_tip_scale = b->m_tip_scale;
|
||||
i.m_tip_width = b->m_tip_width;
|
||||
i.m_tip_size = b->m_tip_size;
|
||||
i.m_tip_spacing = b->m_tip_spacing;
|
||||
i.m_tip_flow = b->m_tip_flow;
|
||||
@@ -589,6 +590,7 @@ bool NodePanelBrushPreset::restore()
|
||||
auto b = std::make_shared<Brush>();
|
||||
b->m_tip_color = i.m_tip_color;
|
||||
b->m_tip_scale = i.m_tip_scale;
|
||||
b->m_tip_width = i.m_tip_width;
|
||||
b->m_tip_size = i.m_tip_size;
|
||||
b->m_tip_spacing = i.m_tip_spacing;
|
||||
b->m_tip_flow = i.m_tip_flow;
|
||||
@@ -667,6 +669,8 @@ bool NodePanelBrushPreset::restore()
|
||||
{
|
||||
if (!b->m_pattern_path.empty())
|
||||
b->load_pattern(b->m_pattern_path, b->m_pattern_thumb_path);
|
||||
if (!b->m_dual_path.empty())
|
||||
b->load_dual(b->m_dual_path, b->m_dual_thumb_path);
|
||||
|
||||
NodeBrushPresetItem* brush = new NodeBrushPresetItem;
|
||||
m_container->add_child(brush);
|
||||
@@ -676,7 +680,6 @@ bool NodePanelBrushPreset::restore()
|
||||
brush->thumb_path = b->m_brush_thumb_path;
|
||||
brush->high_path = b->m_brush_path;
|
||||
brush->m_brush = b;
|
||||
brush->m_brush->m_tip_size = .05f;
|
||||
brush->m_preview->m_brush = b;
|
||||
brush->m_preview->draw_stroke();
|
||||
brush->m_thumb->set_image(brush->m_brush->m_brush_thumb_path);
|
||||
|
||||
Reference in New Issue
Block a user