Follow-up of 1fbdf7bdaa
-> Fixed grabbers size for move gizmo and grabbers dragging size
This commit is contained in:
parent
00a7673a2b
commit
d8f28bc31a
2 changed files with 4 additions and 3 deletions
|
@ -16,7 +16,7 @@
|
|||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
const float GLGizmoBase::Grabber::SizeFactor = 0.025f;
|
||||
const float GLGizmoBase::Grabber::SizeFactor = 0.05f;
|
||||
const float GLGizmoBase::Grabber::MinHalfSize = 1.5f;
|
||||
const float GLGizmoBase::Grabber::DraggingScaleFactor = 1.25f;
|
||||
|
||||
|
@ -53,7 +53,7 @@ float GLGizmoBase::Grabber::get_half_size(float size) const
|
|||
|
||||
float GLGizmoBase::Grabber::get_dragging_half_size(float size) const
|
||||
{
|
||||
return std::max(size * SizeFactor * DraggingScaleFactor, MinHalfSize);
|
||||
return get_half_size(size) * DraggingScaleFactor;
|
||||
}
|
||||
|
||||
void GLGizmoBase::Grabber::render(float size, const float* render_color, bool use_lighting) const
|
||||
|
|
|
@ -150,7 +150,8 @@ void GLGizmoMove3D::on_render(const Selection& selection) const
|
|||
glsafe(::glEnd());
|
||||
|
||||
// draw grabber
|
||||
m_grabbers[m_hover_id].render(true, box.max_size());
|
||||
float mean_size = (float)((box.size()(0) + box.size()(1) + box.size()(2)) / 3.0);
|
||||
m_grabbers[m_hover_id].render(true, mean_size);
|
||||
render_grabber_extension((Axis)m_hover_id, box, false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue