mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Added new icon for "change extruder" menu.
+ some improvements for colored band
This commit is contained in:
parent
58fa4f32de
commit
71f5ed5b9e
2 changed files with 22 additions and 20 deletions
|
@ -2816,18 +2816,13 @@ void DoubleSlider::draw_colored_band(wxDC& dc)
|
|||
int height, width;
|
||||
get_size(&width, &height);
|
||||
|
||||
wxRect main_band = m_rect_lower_thumb;
|
||||
if (is_horizontal()) {
|
||||
main_band.SetLeft(SLIDER_MARGIN);
|
||||
main_band.SetRight(width - SLIDER_MARGIN + 1);
|
||||
}
|
||||
else {
|
||||
const int cut = 2;
|
||||
main_band.x += cut;
|
||||
main_band.width -= 2*cut;
|
||||
main_band.SetTop(SLIDER_MARGIN);
|
||||
main_band.SetBottom(height - SLIDER_MARGIN + 1);
|
||||
}
|
||||
const wxCoord mid = is_horizontal() ? 0.5 * height : 0.5 * width;
|
||||
|
||||
wxRect main_band = is_horizontal() ?
|
||||
wxRect(SLIDER_MARGIN, lround(mid - 0.375 * m_thumb_size.y),
|
||||
width - 2 * SLIDER_MARGIN + 1, lround(0.75 * m_thumb_size.y)) :
|
||||
wxRect(lround(mid - 0.375 * m_thumb_size.x), SLIDER_MARGIN,
|
||||
lround(0.75 * m_thumb_size.x), height - 2 * SLIDER_MARGIN + 1);
|
||||
|
||||
auto draw_band = [](wxDC& dc, const wxColour& clr, const wxRect& band_rc) {
|
||||
dc.SetPen(clr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue