mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Updated "undo/redo" and "search' icons for the toolbar
* added "settings" and "search_blink" icons * suppress the icons scaling update when Plater is in the Preview mode * switched "layers_height" and "search" buttons in the toolbar
This commit is contained in:
parent
70536f8212
commit
6ac1935932
7 changed files with 164 additions and 47 deletions
|
@ -4999,7 +4999,7 @@ bool GLCanvas3D::_init_main_toolbar()
|
|||
return false;
|
||||
|
||||
item.name = "settings";
|
||||
item.icon_filename = "cog_.svg";
|
||||
item.icon_filename = "settings.svg";
|
||||
item.tooltip = _u8L("Switch to Settings") + "\n" + "[" + GUI::shortkey_ctrl_prefix() + "2] - " + _u8L("Print Settings Tab") +
|
||||
"\n" + "[" + GUI::shortkey_ctrl_prefix() + "3] - " + (m_process->current_printer_technology() == ptFFF ? _u8L("Filament Settings Tab") : _u8L("Material Settings Tab")) +
|
||||
"\n" + "[" + GUI::shortkey_ctrl_prefix() + "4] - " + _u8L("Printer Settings Tab") ;
|
||||
|
@ -5011,35 +5011,16 @@ bool GLCanvas3D::_init_main_toolbar()
|
|||
if (!m_main_toolbar.add_item(item))
|
||||
return false;
|
||||
|
||||
/*
|
||||
if (!m_main_toolbar.add_separator())
|
||||
return false;
|
||||
|
||||
item.name = "layersediting";
|
||||
item.icon_filename = "layers_white.svg";
|
||||
item.tooltip = _utf8(L("Variable layer height"));
|
||||
item.sprite_id = 11;
|
||||
item.left.toggable = true;
|
||||
item.left.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_LAYERSEDITING)); };
|
||||
item.visibility_callback = [this]()->bool
|
||||
{
|
||||
bool res = m_process->current_printer_technology() == ptFFF;
|
||||
// turns off if changing printer technology
|
||||
if (!res && m_main_toolbar.is_item_visible("layersediting") && m_main_toolbar.is_item_pressed("layersediting"))
|
||||
force_main_toolbar_left_action(get_main_toolbar_item_id("layersediting"));
|
||||
|
||||
return res;
|
||||
};
|
||||
item.enabling_callback = []()->bool { return wxGetApp().plater()->can_layers_editing(); };
|
||||
if (!m_main_toolbar.add_item(item))
|
||||
return false;
|
||||
|
||||
if (!m_main_toolbar.add_separator())
|
||||
return false;
|
||||
*/
|
||||
|
||||
item.name = "search";
|
||||
item.icon_filename = "search_.svg";
|
||||
item.tooltip = _utf8(L("Search")) + " [" + GUI::shortkey_ctrl_prefix() + "F]";
|
||||
item.sprite_id = 12;
|
||||
item.sprite_id = 11;
|
||||
item.left.toggable = true;
|
||||
item.left.render_callback = [this](float left, float right, float, float) {
|
||||
if (m_canvas != nullptr)
|
||||
{
|
||||
|
@ -5053,6 +5034,27 @@ bool GLCanvas3D::_init_main_toolbar()
|
|||
if (!m_main_toolbar.add_item(item))
|
||||
return false;
|
||||
|
||||
if (!m_main_toolbar.add_separator())
|
||||
return false;
|
||||
|
||||
item.name = "layersediting";
|
||||
item.icon_filename = "layers_white.svg";
|
||||
item.tooltip = _utf8(L("Variable layer height"));
|
||||
item.sprite_id = 12;
|
||||
item.left.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_LAYERSEDITING)); };
|
||||
item.visibility_callback = [this]()->bool {
|
||||
bool res = m_process->current_printer_technology() == ptFFF;
|
||||
// turns off if changing printer technology
|
||||
if (!res && m_main_toolbar.is_item_visible("layersediting") && m_main_toolbar.is_item_pressed("layersediting"))
|
||||
force_main_toolbar_left_action(get_main_toolbar_item_id("layersediting"));
|
||||
|
||||
return res;
|
||||
};
|
||||
item.enabling_callback = []()->bool { return wxGetApp().plater()->can_layers_editing(); };
|
||||
item.left.render_callback = GLToolbarItem::Default_Render_Callback;
|
||||
if (!m_main_toolbar.add_item(item))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -5161,10 +5163,10 @@ bool GLCanvas3D::_init_undoredo_toolbar()
|
|||
|
||||
if (!m_undoredo_toolbar.add_item(item))
|
||||
return false;
|
||||
|
||||
/*
|
||||
if (!m_undoredo_toolbar.add_separator())
|
||||
return false;
|
||||
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -5553,6 +5555,10 @@ void GLCanvas3D::_render_selection_center() const
|
|||
|
||||
void GLCanvas3D::_check_and_update_toolbar_icon_scale() const
|
||||
{
|
||||
// Don't update a toolbar scale, when we are on a Preview
|
||||
if (wxGetApp().plater()->is_preview_shown())
|
||||
return;
|
||||
|
||||
float scale = wxGetApp().toolbar_icon_scale();
|
||||
Size cnv_size = get_canvas_size();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue