Fix small discrepancy in marker placement in light intensity sliders #2924
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.
Purpose of this PR
https://fogbugz.unity3d.com/f/cases/1299750/
The markers in light intensity sliders did not perfectly align with the icon changes. This was because the marker placement was not taking into account the size of the slider's knob (value zero corresponds to the middle of the knob when it is placed at the left corner and not the left corner itself).
I did not adjust the markers at the edges (normalized position 0 or 1) to avoid having a small gap, where the horizontal line of the slider would extend after the marker. There is no transition happening there so this is not a problem and looks better.
Testing status
I have placed the knob exactly at the boundary of a range. In this case 80000 Lux intensity.


Before:
After:
(tip: placing the mouse on the horizontal slider line reveals the marker even when it is covered by the knob).
I have also verified (with Gimp) that the marked is exactly at the middle of the knob, because I was not sure just by looking at it.