mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 13:47:59 -06:00
Fixed rendering undo/redo toolbar arrow.
This commit is contained in:
parent
bc4650d174
commit
b382ac8541
2 changed files with 27 additions and 3 deletions
|
@ -4427,12 +4427,11 @@ bool GLCanvas3D::_init_main_toolbar()
|
|||
arrow_data.top = 0;
|
||||
arrow_data.right = 0;
|
||||
arrow_data.bottom = 0;
|
||||
|
||||
if (!m_main_toolbar.init_arrow(arrow_data))
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(error) << "Main toolbar failed to load arrow texture.";
|
||||
}
|
||||
|
||||
// m_gizmos is created at constructor, thus we can init arrow here.
|
||||
if (!m_gizmos.init_arrow(arrow_data))
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(error) << "Gizmos manager failed to load arrow texture.";
|
||||
|
@ -4643,6 +4642,18 @@ bool GLCanvas3D::_init_undoredo_toolbar()
|
|||
return true;
|
||||
}
|
||||
|
||||
// init arrow
|
||||
BackgroundTexture::Metadata arrow_data;
|
||||
arrow_data.filename = "toolbar_arrow.svg";
|
||||
arrow_data.left = 0;
|
||||
arrow_data.top = 0;
|
||||
arrow_data.right = 0;
|
||||
arrow_data.bottom = 0;
|
||||
if (!m_undoredo_toolbar.init_arrow(arrow_data))
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(error) << "Undo/Redo toolbar failed to load arrow texture.";
|
||||
}
|
||||
|
||||
// m_undoredo_toolbar.set_layout_type(GLToolbar::Layout::Vertical);
|
||||
m_undoredo_toolbar.set_layout_type(GLToolbar::Layout::Horizontal);
|
||||
m_undoredo_toolbar.set_horizontal_orientation(GLToolbar::Layout::HO_Left);
|
||||
|
@ -5376,6 +5387,10 @@ void GLCanvas3D::_render_undoredo_toolbar()
|
|||
|
||||
m_undoredo_toolbar.set_position(top, left);
|
||||
m_undoredo_toolbar.render(*this);
|
||||
if (m_toolbar_highlighter.m_render_arrow)
|
||||
{
|
||||
m_undoredo_toolbar.render_arrow(*this, m_toolbar_highlighter.m_toolbar_item);
|
||||
}
|
||||
}
|
||||
|
||||
void GLCanvas3D::_render_collapse_toolbar() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue