- // same logic as above but x/y are trasnposed
- sizeLabels.y += SLIDER_LABEL_MARGIN;
-
- if ( GetWindowStyle() & wxSL_TOP )
- {
- m_rectSlider.y += sizeLabels.y;
- m_rectSlider.height -= sizeLabels.y;
- }
- else // wxSL_BOTTOM
- {
- m_rectSlider.height -= sizeLabels.y;
-
- m_rectLabel.y += m_rectSlider.height + SLIDER_LABEL_MARGIN;
- }
+ // shrink the slider and move the label to the bottom
+ m_rectSlider.height -= sizeLabels.y + SLIDER_LABEL_MARGIN;
+ m_rectLabel.y += m_rectSlider.height + SLIDER_LABEL_MARGIN;
+ }
+ else if (style & wxSL_LEFT)
+ {
+ // shrink and offset the slider to the right
+ m_rectSlider.x += sizeLabels.x + SLIDER_LABEL_MARGIN;
+ m_rectSlider.width -= sizeLabels.x + SLIDER_LABEL_MARGIN;
+ }
+ else if (style & wxSL_RIGHT)
+ {
+ // shrink the slider and move the label to the right
+ m_rectSlider.width -= sizeLabels.x + SLIDER_LABEL_MARGIN;
+ m_rectLabel.x += m_rectSlider.width + SLIDER_LABEL_MARGIN;