D11578 changes UI strings from "Restrict to image ratio" to
"Preserve aspect ratio". Here we adapt the naming of functions and
config variables too, to lessen developer confusion.
Details
- Reviewers
ngraham huoni - Group Reviewers
Gwenview - Commits
- R260:d3f4793e390a: Adapt code to new crop terminology too
Compile, grep for "restrict"
Diff Detail
- Repository
- R260 Gwenview
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Good stuff, doesn't break anything for me.
There are still a few mentions of "restricted" or "unrestricted" in some comments, but that's probably fine.
E.g. in CropWidget::updateCropRatio and CropTool::mouseMoveEvent
In general I'm not a huge fan of lengthy variable names that precisely mirror their user-visible strings, for precisely this reason. IMHO we should aspire to have our variable names communicate their meaning adequately such that we don't need to rename variables every time we change strings.
Yes, I think those are legitimate and do not pertain to the checkbox.
True in general, but sometimes both UI and code string are the same when trying to make them sound "right" each. Any ideas for something more generic which still makes it clear what this belongs to?
I see your point, but it's a big help to someone unfamiliar with the code. It instantly communicates that X variable corresponds to X GUI element.