-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Activate 100% zoom limit again #21031
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
Open
da-phil
wants to merge
3
commits into
darktable-org:master
Choose a base branch
from
da-phil:restrict_zooming_to_100_percent_by_default
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
You need a
DT_CONTROL_SIGNAL_CONNECTand passing as third argument&darktableorDT_CONTROL_SIGNAL_HANDLEas above but in_preference_changed_constrain_zoomusedarktable.dev->....If the later solution is used, it probably make sense to use
_preference_changed_button_hideas callback. Just renaming it to something more generic :_preference_changed.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.
Thanks, I probably just didn't fully understand how it works and that those settings are already part of the preferences menu.
Please have a look again.
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.
We can simplify this... As outlined above a single
_preference_changedcallback can be used. How it works:DT_SIGNAL_PREFERENCES_CHANGEis emitted.DT_SIGNAL_PREFERENCES_CHANGEin darkroom.c (a single callback, a single connect of you prefer).darktable.develop-><FIELD> = dt_conf_get_<TYPE>(<KEY>);.Let me know if this clarifies things and if the changes to be done is clear to you. TIA.
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.
Yes, I thought so too, but that very callback is called twice every time, because it is registered for 2 color intent widgets. I didn't want to also completely refactor this code. But I agree that ideally we should only have one
_preference_changedcallback per module, as we have way to many unnecessary callbacks all over the place, as also outlined in my comment below:#21031 (comment)
I'd prefer a separate PR to clean up this and do it properly. But if you think it's fine to extend the scope of this PR, I can already do it in this PR. Your call 😉
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.
I'd prefer in this PR because to me the complexity added here should not be and we can do a clean implementation directly in this PR. Just adding the setting in a current
DT_SIGNAL_PREFERENCES_CHANGEcallback (just renaming it to be more generic). If I did not missed something it should be as simple as done currently and clean without the need for another PR.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.
Alrighty, will do once I'm back at my computer 👌