softsyst / qirx_issues

Issue tracker for QIRX
1 stars 1 forks source link

Scrolling with the mouse-wheel #96

Closed Drehrumbum closed 1 year ago

Drehrumbum commented 1 year ago

Hi Clem,

is it possible to activate mouse-wheel events for scrolling through a longer services-list if the mouse simply hovers the entire list? Currently one must first move the mouse-pointer over the (small) vertical scroll-bar to get the wheel working.

softsyst commented 1 year ago

I just tested it, and it works in almost all windows the way you suggest. However, in the Service list, it doesn't. Maybe because the list also can get a horizontal scrollbar. I'll check it.

softsyst commented 1 year ago

Heiko,

This is a very old issue, which I had no longer in memory. Looking into the code brought it back. It's all cosmetic.

The technical solution, all WPF xaml, is that the list is realized within a "ListView" This list can change its width, and if this is getting too small, a horizontal scrollbar appears, as it should. Depending on the height, also a vertical scrollbar appears. This would be fine with the mouse wheel working, except from one cosmetic detail, highlighted in the red circle:

image

In the lower right corner, where both scrollbars meet, a not so nice and useless square is appearing (red circle), which I was not able to remove. Maybe it's possible in some way, I did not manage.

As a lame workaround, the whole list was additionally embedded into a "ScrollViewer". The square disappears, but so does the working of the mouse wheel on the list.

My suggestion is now to omit the splitter for the service list and give it a fixed width which is not too large as the labels have at most 16 characters width, if I am not mistaken. In this way the horizontal scrollbar should be avoided altogether. This would look like so, with a simple separator line instead of the splitter, but the mouse wheel working:

image

Sometimes, GUI is really fun!

Clem

Drehrumbum commented 1 year ago

Hi Clem!

I’ve seen that some guys at Stackoverflow or M$ faced the same problem in the past. Maybe you’ve seen it too. Not tested, but this example looks nice at first sight:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/124de0d4-3e68-457c-8e27-b84a56c94e86/scrolling-listview-with-mouse-wheel?forum=wpf

Your suggestion might be a solution if the screen-resolution is high enough, let’s say HD. I think every square-inch inside of the QIRX-window is much too expensive (especially on older laptops) to work with a fixed width of the list-box. Keep the size changeable, plzzzz. ;)

Ciao 4 now

softsyst commented 1 year ago

Yes, I also saw these solutions. A separate mouse wheel handler, just to avoid that rect? Hesitating...

Edit: But wait.. Here comes the next (final) offer, suitable for our microscreen community:

image

No horizontal scrollbar => no nasty rectangle, but (most important!) : mouse wheel is working. Instead of the horizontal scrollbar, the splitter does this work equally well, and quicker.

Drehrumbum commented 1 year ago

Looks great! Well done!

softsyst commented 1 year ago

Bitte die 4.0.9 mal checken, ob das so ist, wie du es dir vorstellst.

Drehrumbum commented 1 year ago

It's fine. THX!

softsyst commented 1 year ago

Thx for comment, I close it.