Cabbage Logo
Back to Cabbage Site

Image sliders - was FilmStrip sliders

I’m just starting a new thread for image sliders, as opposed to FilmStrip ones. @Gerbo, I’m pinging you with this one. Things look a little better now, but there are still issues as you can see below.

In summary:

  1. There is still a little jump if you don’t click the centre of the slider thumb. I’ve check with native JUCE sliders and this is the case too. I guess that’s why they use such thin thumbs.
  2. Because I had to resize the actually slider, mouse events on the very outer extremes of the slider container are not registered with the underlying slider. If I added a mousedown event handler here it would break the functionality of the slider that this widget contains.
  3. The last thing to try here is adding a custom thumb component, with its own mouse event handler that then pass on the position info to the slider. It’s messy, but I think it might be the only solution.

Much better this way Rory. I see it great! Thanks :+1:

Yes, it is true about JUCE, and I have observed that the native controls in the own examples that I have built also jump slightly.

Could the control white point be made with a custom measurement and thus span the same size as the image?

If I understand you, I think it will be just as easy to draw the entire thumb onto a custom component. I might not get a chance to try this for a few days. I’ll let you know when I have something to show.

Now with the thumb component. I need add velocity control to it, but I think it might work like this.

Nice job! I have already tested it. :+1:
The click is now accurate, and nothing moves at all.
It is being very successful, and you are very close. :wink:
I will implement it in the next job which is already well advanced and uses two large sliders. For now I have them with filmstrip, but I would like to test them this way.

Nice. I will also have to think about the tracker image? I assume you want to provide your own? Once I have all these things added I will remove the old style way of using images with sliders en lieu of this one. I think this way will actually be easier to manage and maintain.

Could it be an invisible image that determines the length?

Can you try the latest dev tip now? I’ve added support for the background image too. I’m not sure about resizing though. Should we show the images at 100% or apply resizing? If one uses a slider the same height as the image then no scaling should apply. But if you don’t scaling will take place. Note that no scaling takes place with the thumb component.

Could you tell me the exact measurements of the background image?
Does not drift fully to extremes

The click and scrolling is now very elegant

By assigning the same length as the background image, the fader does not reach the end of the edges.
I see that it works for you, but it gives me that limitation.

100% would be fine, but if the measurements can be modified it would be great :+1:

Ok, I’ll set it up so that the tracker starts at 0,0 instead of where the underlying slider is. I’ll push the changes a little later…

Can you try the latest dev tip? In this version the tracker image is draw from position 0,0. The underlying slider, which is resized, has no effect on it.

Are you using any new code in the csd? In these last two tests, I do not have any variation, and I still have the problem that it does not go to the extremes. Could it be that the development branch is not up to date?

I’m sorry, I just tried this new version on my laptop and it’s all wrong :see_no_evil: I must have forgot to push from my work PC. I will do this first thing tomorrow morning. I’m sorry again about that, I never noticed until you mentioned it.

Do not worry. Tomorrow afternoon I can do the tests.

Hi @Gerbo The code should be in a better state now if you want to test from git :wink:

I have tested it, and it works with great precision, but I think that the default parameters and scene memorization still need to be implemented. An elegant and fine work :wink: :+1:

Oh yes, good point. Thanks, I’ll add those when I get a chance.