Closed Tomas-M closed 5 years ago
I edited my previous post few times so if you are reading this in email, please re-read on github site.
I've implemented scrollbar indicator as per screenshot 1 https://github.com/Tomas-M/xlunch/commit/4a2169c2bbdb0bfba1a8e6ed1726a5a5232c1b3b It is a proof of concept now, it is not draggable, it is only displayed. It shows only if there are entries beyond the screen and the user specified --scrollbar Neither colors nor positions are configurable yet.
Feel free to comment
Looks good. Draggable shouldn't be too hard, just keep the position relative to the scroll-bar where a mouse-down event occured, then on mouse-move events check if the difference in the Y direction is greater than the scroll-bar height/rows. If it is then perform the scroll action in the correct direction.
It's fine. Simple and Minimalistic.
Some time in the future (next year?) I may try to implement to make it draggable/clickable. For now I am happy with just the visual indication.
Hmm, I just grabbed the latest version (4.1.0) and it shows the scrollbar with to way of getting rid of it. There is no --scrollbar
option and no colour options I can use to at least make it transparent.
My idea was to always show it if there are more items to scroll.
And --scroll is now On by default, use --noscroll to disable scrolling. Is that sufficient? Or do you propose other changes? Thank you.
Now I can see I mentioned --scrollbar in my previous post, that is a typo, I meant --scroll at that time.
Ah okay. Well I just wanted a bit more control over the scrollbar. Show/hide, and preferably being able to change the colours/position of it like with everything else in xlunch.
I was lazy :-+ Feel free to implement that if you like :-)
I am missing some sort of scrollbar or next/prev page indicator in Xlunch. When there are several icons beyond the current screen, I would like to have a possibility to have visual indication of that, so user actually knows he can scroll.
Two possible solutions come to my mind:
1) some sort of fully functional scrollbar, as like we know it, with a hardcoded shape (simple vertical rectangle), where user could possibly change only the colors, width and opacity of it (eg color for scrollbar background, and color for scrollbar drag element, and opacity of whole thing) or 2) some indicator buttons (specified by user such as
--scrollnext /path/to/image.png
and--scrollprev /path/to/image.png
) ... These images would be visible only if there is a possibility to scroll down/up, and clicking it would simply scroll one step down/up.In both cases, I am not sure how to position the scrollbar or next/prev images, I mean, how would the user specify where does he want to see it. Maybe the user could specify just right-side distance (in pixels) from the icons, and top-bottom position would be automatically calculated by xlunch (the same height as the screen available for icons)
@PMunch Which option would you prefer? Any further thoughts?
I would probably prefer the solution 1, but it may be hard to implement the actual "dragging" of the scrol-drag element.
option 1
option 2