mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
fix slider
This commit is contained in:
parent
efe5583e8a
commit
f3e4016795
4 changed files with 19 additions and 23 deletions
|
@ -2029,8 +2029,9 @@ void GLCanvas3D::render(bool only_init)
|
|||
float right_margin = SLIDER_DEFAULT_RIGHT_MARGIN;
|
||||
float bottom_margin = SLIDER_DEFAULT_BOTTOM_MARGIN;
|
||||
if (m_canvas_type == ECanvasType::CanvasPreview) {
|
||||
right_margin = SLIDER_RIGHT_MARGIN;
|
||||
bottom_margin = SLIDER_BOTTOM_MARGIN;
|
||||
const float scale_factor = get_scale();
|
||||
right_margin = SLIDER_RIGHT_MARGIN * scale_factor * GCODE_VIEWER_SLIDER_SCALE;
|
||||
bottom_margin = SLIDER_BOTTOM_MARGIN * scale_factor * GCODE_VIEWER_SLIDER_SCALE;
|
||||
}
|
||||
wxGetApp().plater()->get_notification_manager()->render_notifications(*this, get_overlay_window_width(), bottom_margin, right_margin);
|
||||
}
|
||||
|
@ -6871,7 +6872,8 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with
|
|||
//BBS: GUI refactor: add canvas size as parameters
|
||||
void GLCanvas3D::_render_gcode(int canvas_width, int canvas_height)
|
||||
{
|
||||
m_gcode_viewer.render(canvas_width, canvas_height, SLIDER_RIGHT_MARGIN);
|
||||
float scale_factor = get_scale() * GCODE_VIEWER_SLIDER_SCALE;
|
||||
m_gcode_viewer.render(canvas_width, canvas_height, SLIDER_RIGHT_MARGIN * GCODE_VIEWER_SLIDER_SCALE);
|
||||
IMSlider *layers_slider = m_gcode_viewer.get_layers_slider();
|
||||
IMSlider *moves_slider = m_gcode_viewer.get_moves_slider();
|
||||
|
||||
|
@ -6940,21 +6942,17 @@ void GLCanvas3D::_render_selection_center() const
|
|||
void GLCanvas3D::_check_and_update_toolbar_icon_scale()
|
||||
{
|
||||
// Don't update a toolbar scale, when we are on a Preview
|
||||
if (wxGetApp().plater()->is_preview_shown())
|
||||
{
|
||||
if (wxGetApp().plater()->is_preview_shown()) {
|
||||
IMSlider *m_layers_slider = get_gcode_viewer().get_layers_slider();
|
||||
IMSlider *m_moves_slider = get_gcode_viewer().get_moves_slider();
|
||||
const float sc = get_scale();
|
||||
|
||||
#if ENABLE_RETINA_GL
|
||||
IMSlider* m_layers_slider = get_gcode_viewer().get_layers_slider();
|
||||
IMSlider* m_moves_slider = get_gcode_viewer().get_moves_slider();
|
||||
const float sc = m_retina_helper->get_scale_factor();
|
||||
m_layers_slider->set_scale(sc * m_layers_slider->m_scale);
|
||||
m_moves_slider->set_scale(sc * m_layers_slider->m_scale);
|
||||
m_layers_slider->set_scale(sc * GCODE_VIEWER_SLIDER_SCALE);
|
||||
m_moves_slider->set_scale(sc * GCODE_VIEWER_SLIDER_SCALE);
|
||||
m_gcode_viewer.set_scale(sc);
|
||||
|
||||
auto* m_notification = wxGetApp().plater()->get_notification_manager();
|
||||
auto *m_notification = wxGetApp().plater()->get_notification_manager();
|
||||
m_notification->set_scale(sc);
|
||||
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue