View toolbar's initialization of icon size moved from GLCanvas3D::GLCanvas3D() to Plater::priv::priv() for OSX build

This commit is contained in:
Enrico Turri 2020-03-02 12:45:04 +01:00
parent 3f69336204
commit 595128a90d
2 changed files with 13 additions and 5 deletions

View File

@ -1471,13 +1471,11 @@ GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas, Bed3D& bed, Camera& camera, GLToolbar
m_timer.SetOwner(m_canvas); m_timer.SetOwner(m_canvas);
#if ENABLE_RETINA_GL #if ENABLE_RETINA_GL
m_retina_helper.reset(new RetinaHelper(canvas)); m_retina_helper.reset(new RetinaHelper(canvas));
#if !ENABLE_NON_STATIC_CANVAS_MANAGER
// set default view_toolbar icons size equal to GLGizmosManager::Default_Icons_Size // set default view_toolbar icons size equal to GLGizmosManager::Default_Icons_Size
#if ENABLE_NON_STATIC_CANVAS_MANAGER
wxGetApp().plater()->get_view_toolbar().set_icons_size(GLGizmosManager::Default_Icons_Size);
#else
m_view_toolbar.set_icons_size(GLGizmosManager::Default_Icons_Size); m_view_toolbar.set_icons_size(GLGizmosManager::Default_Icons_Size);
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER #endif // !ENABLE_NON_STATIC_CANVAS_MANAGER
#endif #endif // ENABLE_RETINA_GL
} }
m_selection.set_volumes(&m_volumes.volumes); m_selection.set_volumes(&m_volumes.volumes);

View File

@ -82,6 +82,11 @@
#include "../Utils/UndoRedo.hpp" #include "../Utils/UndoRedo.hpp"
#include "../Utils/Thread.hpp" #include "../Utils/Thread.hpp"
#include "RemovableDriveManager.hpp" #include "RemovableDriveManager.hpp"
#if ENABLE_NON_STATIC_CANVAS_MANAGER
#ifdef __APPLE__
#include "Gizmos/GLGizmosManager.hpp"
#endif // __APPLE__
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
#include <wx/glcanvas.h> // Needs to be last because reasons :-/ #include <wx/glcanvas.h> // Needs to be last because reasons :-/
#include "WipeTowerDialog.hpp" #include "WipeTowerDialog.hpp"
@ -2039,6 +2044,11 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
#if ENABLE_NON_STATIC_CANVAS_MANAGER #if ENABLE_NON_STATIC_CANVAS_MANAGER
view3D = new View3D(q, &model, config, &background_process); view3D = new View3D(q, &model, config, &background_process);
preview = new Preview(q, &model, config, &background_process, &gcode_preview_data, [this]() { schedule_background_process(); }); preview = new Preview(q, &model, config, &background_process, &gcode_preview_data, [this]() { schedule_background_process(); });
#ifdef __APPLE__
// set default view_toolbar icons size equal to GLGizmosManager::Default_Icons_Size
m_view_toolbar.set_icons_size(GLGizmosManager::Default_Icons_Size);
#endif // __APPLE__
#else #else
view3D = new View3D(q, bed, camera, view_toolbar, &model, config, &background_process); view3D = new View3D(q, bed, camera, view_toolbar, &model, config, &background_process);
preview = new Preview(q, bed, camera, view_toolbar, &model, config, &background_process, &gcode_preview_data, [this](){ schedule_background_process(); }); preview = new Preview(q, bed, camera, view_toolbar, &model, config, &background_process, &gcode_preview_data, [this](){ schedule_background_process(); });