Code: Select all
<Slider x="19" y="269" points="(0,0),(57,0)" up="volume_slider_normal" down="volume_slider_down" over="volume_slider_over" tooltiptext="Volume: $V%" value="volume" xkeepratio="true" />
Code: Select all
<Slider x="300" y="303"
Code: Select all
<Slider x="19" y="269" points="(0,0),(57,0)" up="volume_slider_normal" down="volume_slider_down" over="volume_slider_over" tooltiptext="Volume: $V%" value="volume" xkeepratio="true" />
Code: Select all
<Slider x="300" y="303"
I guess it depends on what you call "correctly"...You will note that although both the image and the slider are to be displayed at x=400, y=250; the slider is not displayed correctly (even when set at 0%).
It rather looks like only the left position of the slider is taken into account when xkeepratio is set to true (as if the width was 0). This is indeed a bug, I'll have a look at it during the week-end.Now, resize the window and you will see the slider is not positioned the same as the image at all. In fact, it seems to move 2x as fast as the image towards the right while resizing.
Oh, I see. That makes sense. I had just assumed the slider's 0% should be the same coordinators as the slider control. But that small offset can be taken into account, so I'll agree that is a feature!I guess it depends on what you call "correctly"...
Currently, the corrdinates defining the Bezier curve of the slider are relative to the top-left-hand corner of the Slider control. The slider cursor being centered on the corresponding curve point, it is normal to see this offset. You can see this easily when the slider is at 0%: the center of each square is exactly on a corner of the other square.
So this is a feature, not a bug
Thank you very much! As long as the SliderBackground is positioned the same as an Image when resizing, the problem would be fixed. We can always fine-tune the slider itself using the Points attribute.It rather looks like only the left position of the slider is taken into account when xkeepratio is set to true (as if the width was 0). This is indeed a bug, I'll have a look at it during the week-end.
In fact, this is not a bug either!Now, resize the window and you will see the slider is not positioned the same as the image at all. In fact, it seems to move 2x as fast as the image towards the right while resizing.
Code: Select all
<!-- MAIN CONTROL Background -->
<Image x="19" y="269" image="main_blank_controls" lefttop="leftbottom" rightbottom="leftbottom" xkeepratio="true" />
<!-- Mute and Volume Slider Controls -->
<Slider x="19" y="269" points="(405,35),(463,35)" up="volume_slider_normal" down="volume_slider_down" over="volume_slider_over" tooltiptext="Volume: $V%" value="volume" lefttop="leftbottom" rightbottom="leftbottom" xkeepratio="true" >
<SliderBackground image="volume_slider_background" nbhoriz="1" nbvert="7" padhoriz="0" padvert="0" />
</Slider>
No, I don't want to do that. The SliderBackground tag is there to allow animation effects when moving the cursor of the slider. The "core" of the control is still the Bezier curve, and the background should not dictate its width to the control.Can we please change the positioning of the <Slider> so it works like this:
- If <Slider> contains a <SliderBackground> then use the width of the <SliderBackground> to determine the position of the <Slider>
- If <Slider> contains no background, then use the width of the bezier curve to determine the position of the <Slider>.
Users browsing this forum: No registered users and 3 guests