Auto-scaling scrollbars

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Auto-scaling scrollbars

Post by Lonesome Ducky »

Most scrollbars I've seen scale the button in the middle depending on how much you can scroll. In irrlicht, the button stays the exact same size no matter what. I tested my own revision of the scrollbar, scaling the button to the width of the scrollbar divided by the range. It was extremely easy, and made it far easier to tell how much it could scroll. Are there any plans to change the scrollbar to something like that, or will it stay the same?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Auto-scaling scrollbars

Post by CuteAlien »

Maybe, I wrote a patch for that once (but old Irrlicht version and back then I didn't realize yet how much patches suck which do more than one single thing: http://www.michaelzeilfelder.de/irrlich ... ures.patch), but it hasn't been too high on my priority list so far. So basically I like it and it's probably not too much work adding it (well, some work for writing tests first) once I get to it.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Re: Auto-scaling scrollbars

Post by Lonesome Ducky »

That's good! And if I can make a suggestion if you do add it at some point, can you make the button scale not just by the total range, but say by the range divided by a user defined number? Because say you wanted a really smooth scrollbar, so you set the max really high. With scaling just on the range, the button would be tiny, but maybe you don't have a whole lot to scroll through. But if the user could define that divisor, you could have a really smooth scrollbar and a button that shows how much there really is to scroll.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Auto-scaling scrollbars

Post by CuteAlien »

I think I simply used a min-size in my patch which could be set.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Re: Auto-scaling scrollbars

Post by Lonesome Ducky »

Well I mean, take the scrollbar on your browser for example. It has that really smooth movement, but a large button. To get the smooth movement like that in irrlicht, you'd have to set the max of the scrollbar really high, and doing so would make the button small. I'm proposing something that allows for a high max, but a button that takes up maybe half the scrollbar. So instead of deciding the width of the scrollbar by dividing the scroll length by the range, maybe divide the scroll length by the range that is itself divided by a user defined number. This way you could have a max of say, 10000, and change that number so your button can still take up half the scrollbar. Sorry if my explanation isn't very clear, and I don't want to sound like I'm demanding anything either
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Auto-scaling scrollbars

Post by CuteAlien »

Ok, I'll read & think about it again when I get to it, probably makes sense when I start doing a few tests ;-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply