Use autolayout in OnGUI_Keys_LanguageTranslations

More
7 years 6 months ago #1789 by flassari
I'm embedding LocalizationEditor.OnGUI_Keys_Languages(..) into my own inspectors and it overflows when it's not a top level element.

I've fixed it by replacing line 289 in LocalizationEditor_Terms_Description.cs:
Translation = EditorGUILayout.TextArea(Translation, LocalizationEditor.Style_WrapTextField, GUILayout.Width(Screen.width-260 - (autoTranslated ? 20 : 0)));
with
Translation = EditorGUILayout.TextArea(Translation, LocalizationEditor.Style_WrapTextField);

Unity's EditorGUILayout's auto sizing handles the sizing just fine for all occasions, there's no need to explicitly set the size there.

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #1791 by Frank
Hi,
Forcing the width value was used for correctly displaying the Auto-Translated button/Flag, That was breaking the default alignment.
However, that flag was removed in one of the latest versions, so I should be able to remove that code as well and use the default sizing.
I will test this further and if so, update the code.

Thanks,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

Time to create page: 0.201 seconds
Template by JoomlaShine