I’m having some trouble with a class that groups customised sliders. In the attached picture you can see the app with a grid of 100x100px squares divided in 10x10 little squares. On top of that there are two slider groups of (intended) 100px high and 400px wide that should have been placed at (100, 100) and (100, 200).
First of all, the area of the slider is shown shorter than my requirements (100px of height) if they were well located.
Secondly, this call: sequencers[I]->setBounds(x0, y, seqW, seqH); does not seem to be working in my case, since the whole group should be 400px wide and not 200, as you can observe.
I would like to know what am I missing or doing wrong.
I made a public repository just for you to have a proper access to this work in progress: GitHub - GusCarr/eh00scratch
Thank you very much.
However, the sliders height is still shorter than the set value (see pic). I am solving this by modifying the group vertical position and height, but I think I should plunge into the framework code to find out the reasons for this behaviour.
Thanks a lot.
Hello everybody, it seems that I have found the reason for the initial post.
The slider cursor has limits in its travel. These limits are half width from top and bottom of the object area. I wanted to have a slider that would use all the space available, like those found in PureData. When I asked the object about its bounds for colouring the area, it returned me the geometry of the cursor track. The workaround I came up with is simply assigning a shifted position and greater height to the slider:
Also, I had to tweak the SliderLookAndFeel::drawLinearSlider () method a little to avoid the cursor going off the slider.
In the attached screenshot it can be seen a couple of objects with sliderGroups inside. The first slider (there are 64 of them) of the topmost group was dragged to the highest position. Also in the picture is the main part of the tweaking to the SliderLookAndFeel::drawLinearSlider () method.
Great, thanks @reuk. I think that it may be impossible to have tutorials of every little thing in the framework. I think I should to spend more time surfing code and docs before posting, he he.