mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-03 01:05:14 +08:00
DoubleSlider::Control thumb text rendered closer to the slider
This commit is contained in:
parent
1c826c063b
commit
1af798dbd7
@ -1,3 +1,4 @@
|
|||||||
|
// version 120 is needed for gl_PointCoord
|
||||||
#version 120
|
#version 120
|
||||||
|
|
||||||
uniform vec3 uniform_color;
|
uniform vec3 uniform_color;
|
||||||
|
@ -566,12 +566,12 @@ void Control::draw_tick_text(wxDC& dc, const wxPoint& pos, int tick, bool right_
|
|||||||
dc.GetMultiLineTextExtent(label, &text_width, &text_height);
|
dc.GetMultiLineTextExtent(label, &text_width, &text_height);
|
||||||
wxPoint text_pos;
|
wxPoint text_pos;
|
||||||
if (right_side)
|
if (right_side)
|
||||||
text_pos = is_horizontal() ? wxPoint(pos.x + 1, pos.y + m_thumb_size.x) :
|
text_pos = is_horizontal() ? wxPoint(pos.x + 1, pos.y + m_thumb_size.x / 4) :
|
||||||
wxPoint(pos.x + m_thumb_size.x+1, pos.y - 0.5*text_height - 1);
|
wxPoint(pos.x + m_thumb_size.x + 1, pos.y - 0.5 * text_height - 1);
|
||||||
else
|
else
|
||||||
text_pos = is_horizontal() ? wxPoint(pos.x - text_width - 1, pos.y - m_thumb_size.x - text_height) :
|
text_pos = is_horizontal() ? wxPoint(pos.x - text_width - 1, pos.y - m_thumb_size.x / 4 - text_height) :
|
||||||
wxPoint(pos.x - text_width - 1 - m_thumb_size.x, pos.y - 0.5*text_height + 1);
|
wxPoint(pos.x - text_width - 1 - m_thumb_size.x, pos.y - 0.5 * text_height + 1);
|
||||||
dc.DrawText(label, text_pos);
|
dc.DrawText(label, text_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Control::draw_thumb_text(wxDC& dc, const wxPoint& pos, const SelectedSlider& selection) const
|
void Control::draw_thumb_text(wxDC& dc, const wxPoint& pos, const SelectedSlider& selection) const
|
||||||
|
@ -343,7 +343,7 @@ bool Preview::init(wxWindow* parent, Model* model)
|
|||||||
#endif // ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
|
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
m_moves_slider = new DoubleSlider::Control(m_bottom_toolbar_panel, wxID_ANY, 0, 0, 0, 100, wxDefaultPosition, wxSize(-1, 4 * GetTextExtent("m").y), wxSL_HORIZONTAL);
|
m_moves_slider = new DoubleSlider::Control(m_bottom_toolbar_panel, wxID_ANY, 0, 0, 0, 100, wxDefaultPosition, wxSize(-1, 3 * GetTextExtent("m").y), wxSL_HORIZONTAL);
|
||||||
m_moves_slider->SetDrawMode(DoubleSlider::dmSequentialGCodeView);
|
m_moves_slider->SetDrawMode(DoubleSlider::dmSequentialGCodeView);
|
||||||
|
|
||||||
wxBoxSizer* bottom_toolbar_sizer = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* bottom_toolbar_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user