-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add option to invert the behavior of mouse scroll up/down. #10241
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
Conversation
843b157 to
22bee17
Compare
data/darktableconfig.xml.in
Outdated
| <longdescription>sets level for smoothing of brush strokes. stronger smoothing leads to less nodes and easier editing but with lower control of accuracy.</longdescription> | ||
| </dtconfig> | ||
| <dtconfig prefs="darkroom" section="general"> | ||
| <name>masks_updown</name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could probably have a clearer name - based on the description, how about masks_scroll_up_increases or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed !
src/develop/imageop_gui.c
Outdated
| return button; | ||
| } | ||
|
|
||
| int dt_mouse_scroll_updown(int up) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similarly name this dt_mask_scroll_up_increases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
completely agree !
just one small point about default value...
as the original author of all this, I remember that I disagreed with that (up to decrease) but some devs were absolutely against doing it the other way... Sometimes you have to make concession ;)
| <dtconfig prefs="darkroom" section="general"> | ||
| <name>masks_updown</name> | ||
| <type>bool</type> | ||
| <default>false</default> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally, I would have done it this way :
- for "old" user (those with darktablerc already in place => default to false in order to not break habits.
- for "new" users (those without darktablerc) => default to true, which is way better imho
not sure if it's easy to do, thought... maybe we can set it to true at the same place we fill the performance prefs at first run ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm not sure if we can do this either. Much as I think up=up is the best, we should default to the status quo if we can't be smarter than that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Status quo is wrong and also inconsistent with pretty much any desktop environment and with dt's sliders, which use scroll up to increase values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost impossible because at the time the darktableconfig.xml is loaded the missing keys are created. So to achieve that we will need many changes into the loaded at different stages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much as I think up=up is the best
Now version doing just that and current users can revert to previous behavior. Is that ok for everyone ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm... I've done a quick test, and it seems that if in control/conf.c:487 you write something like
if(defaults)
{
dt_configure_performance();
dt_conf_set_bool("masks_updown", TRUE);
}
that do the job... but maybe this has some unexpected drawbacks... I don't know this part of code very well...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now version doing just that and current users can revert to previous behavior. Is that ok for everyone ?
oops, sorry, I've not seen this msg... for me that's perfect indeed (and simpler than my proposal)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TurboGit : sorry to be annoying but with your last change, I think we need to change the pref names and descriptions... or maybe better to default it to true and inverse the routine in imageop_gui.c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlicVB on reflection I think you might be right. It should be "select to do something non-standard". So the preference should be named "scroll down to increase mask parameters" and should default to false.
22bee17 to
df51e50
Compare
|
New version just pushed with the proposed changes. |
df51e50 to
3f90233
Compare
|
A few things
Edit: see my reply to @AlicVB above - I think point 1 is correct but the preference should be renamed (down to increase). |
30d2db7 to
d89cb1f
Compare
|
@elstoc :
And as we are at it:
|
|
The option is still not working when changing opacity before placing a shape on the canvas - ctrl+scrolling up decreases opacity regardless of the selected option. The tooltip on the option should state something like "when using the mouse scroll wheel to change mask parameters, scroll down to increase the mask size, feather size, opacity, brush hardness and gradient curvature\nby default scrolling up increases these parameters" I don't really have an opinion on your two questions (I never entirely understood what hardness was and how it differs from size for brushes, and I don't use liquify) |
That's one of the thing I did not test :) Will fix. |
The strength vector is rotated counter clockwise when scrolling up currently. And I'm wondering if it shouldn't be the opposite. |
d89cb1f to
3c85705
Compare
|
All changes done now. Plus I have changed the brush handling as it was not consistent with other shapes and more importantly it was not consistent with itself has the handling was inverted in creation or editing mode! Last, I have inverted the liquify rotation to be more natural (at least to me). Let's see if this is ok with others. |
|
@AlicVB : I'd like to have you feedback on the brush + liquify rotation. |
|
@TurboGit : indeed, I prefer how the liquify rotation works now : up=clockwise let's just hope it's not too culturally dependent... (let's not count mathematics as a culture for this case ;) for the brush I prefer that too... some small points :
If we want to implement point 2., I can have a look if you want, but tbh I'm also ok with the current "inconsistency" |
|
One more thing I hadn't spotted before... You can change curvature of a gradient mask before placing it on the canvas. This currently operates the opposite way round to when it's changed after placement. |
At the same time all checks have been changed to be "positive" and make the conditional easier to read. This is especially important since the default behavior is now scroll-up = increase mask parameters.
In creation mode (brush not yet placed) the scoll was changing the size and the shift-scroll was changing the hardness. For brush already on canvas, the actions were inverted. This makes the brush behave consitently in creation or editing mode. This also is more consistent with all other shapes.
Seems more natural with other shapes parameters changes.
3a3cef3 to
345b036
Compare
Not only the path but we would need to change all other forms (circle, ellipse...)
@AlicVB Thanks, I let you look at this. For my part this PR is ready to merge I have fixed the curvature inconsistency reported by @elstoc and the tooltip you have report. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good for me now
|
So merged ! Thanks for all the reviews. |
No description provided.