Skip to content

Commit

Permalink
Fix the Width Slider Not Translating Smoothly (#1391)
Browse files Browse the repository at this point in the history
# Description

The slider would jump around to fix the constraints because a division
symbol was mistakenly replaced with a multiplication symbol, this fixes
that.

---

<details><summary><h1>Media</h1></summary>
<p>


![edf53e72db6e17d97df08940f04e72d7](https://github.com/user-attachments/assets/b4ebcca5-e56b-41ab-8200-a2235d9b6f7c)

</p>
</details>

---

# Changelog

:cl:
- fix: The width slider in the profile editor view now moves correctly
regarding the height slider.

Co-authored-by: sleepyyapril <[email protected]>
  • Loading branch information
sapphirescript and sleepyyapril authored Jan 1, 2025
1 parent 71f2005 commit 6dd8c09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ private void UpdateDimensions(SliderUpdate updateType)

if (updateType == SliderUpdate.Height || updateType == SliderUpdate.Both)
if (ratio < 1 / sizeRatio || ratio > sizeRatio)
widthValue = heightValue * (ratio < 1 / sizeRatio ? (1 / sizeRatio) : sizeRatio);
widthValue = heightValue / (ratio < 1 / sizeRatio ? (1 / sizeRatio) : sizeRatio);

if (updateType == SliderUpdate.Width || updateType == SliderUpdate.Both)
if (ratio < 1 / sizeRatio || ratio > sizeRatio)
Expand Down

0 comments on commit 6dd8c09

Please sign in to comment.