Skip to content
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

Fixed a colorpicker bug (fixed inconsistent raw values) #1108

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/UI/ColorPickers/ColorPicker.gd
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ func _notification(what: int) -> void:


func _on_color_picker_color_changed(color: Color) -> void:
# Due to the decimal nature of the color values, some values get rounded off
# unintentionally before entering this method.
# Even though the decimal values change, the HTML code remains the same after the change.
# So we're using this trick to convert the values back to how they are shown in
# the color picker's UI.
color = Color(color.to_html())
if Tools.picking_color_for == MOUSE_BUTTON_RIGHT:
right_color_rect.color = color
else:
Expand Down
Loading