-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MRG: Change _TimeViewer slider style #7509
MRG: Change _TimeViewer slider style #7509
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7509 +/- ##
==========================================
- Coverage 90.18% 90.12% -0.07%
==========================================
Files 453 453
Lines 81875 82703 +828
Branches 13056 13057 +1
==========================================
+ Hits 73843 74537 +694
- Misses 5203 5346 +143
+ Partials 2829 2820 -9 |
What do you think @agramfort, @hoechenberger, @larsoner, @drammock ? |
+1 for style 2 with slightly less thick tube & slider. This then also mimics the sensor-level plots (e.g. |
Also feel free to share if you have any suggestions for the colors. |
That could work! What do the others think? Sure, I think it's more aesthetically pleasant to look at those sliders where the tube is narrower than the slider element, but I think this here is an important tradeoff to make between eye candy and usability. Regarding the colors, can you adjust the tube color to be slightly less salient? Very-light-gray-ish or something? |
Good idea! |
It's not by any chance possibly to specify a color for the outline (border) of the tube, is it? Bc then you could make the tube black (as the background) and still indicate that this is a slider widget by having a fine outline drawn in a different color, inside which the slider can move. |
AFAIK not just with sliders but maybe with vtkBorderWidgets... Reference: https://vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BorderWidget |
Seems too complicated… let's see if a less prominent tube color does the trick for now :) |
@GuillaumeFavelier looks good to me!! |
@GuillaumeFavelier I just pulled and tried this out and I noticed another (minor) oddity: When I click on a slider somewhere left or right of its horizontal center point and then start dragging, as soon as dragging begins, the slider jumps such that it's centered horizontally below the cursor. |
If you click the tube it's normal that the slider jumps but when I drag, the slider moves only at the end of the interaction for me. I don't think I can reproduce this |
@GuillaumeFavelier I've recorded a video: |
I think we can live with that :)
… |
Thank you, now I understand what you mean. |
Looks great to me, I do like the slider filling up the entire height of the tube |
This is ready for merge then |
Thanks @GuillaumeFavelier |
It occurs to me that I never asked for feedbacks for the slider style, I just went with what I found practical but apparently the current design has some limitations. For example, since the slider tube is very thin it's easy to miss it and rotate the brain instead (reported in #7247 (comment) and offline by @hoechenberger). This PR tries to address that by changing the style of the slider (and by doing so, modify it's hitbox).
I suggest 2 styles of sliders. In both styles I removed the end cap. In style 1, I increased the tube width but the overall style stays similar. The style 2 is a bit extreme but fixes the original issue quite easily.
master
Except the size, it's also possible to change the colors (c.f. pyvista/pyvista#511):
Sadly, changing the shape or replacing the handle by a texture would require way more work on the VTK part.
It's an item of #7162