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

Make grid ampersand workaround platform specific #3807

Merged
merged 1 commit into from Mar 11, 2023

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Mar 11, 2023

Background

Originally, mod names, abstracts, and authors containing & characters would have them removed and the next character underlined on Mono:

image

#3149 fixed that by escaping the ampersands, which is done by adding another one.

Problem

Windows clients currently see && in the grid:

image

Cause

.NET is cross-platform in principle, but not quite "write once run anywhere" in practice. Whenever Mono deviates from how .NET does something, pain ensues for application developers. In this case, Mono treats & as a hotkey prefix character in the data grid view, but .NET treats it as just a normal character.

Changes

Now we only double the ampersand on Mono. Windows gets the single ampersand and likes it:

image

Fixes #3806.

@HebaruSan HebaruSan added Bug Easy This is easy to fix GUI Issues affecting the interactive GUI Windows Issues specific for Windows labels Mar 11, 2023
Copy link
Member

@techman83 techman83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it cross platform they said, it'll be fun they said! 😆 - Looks like a clean implementation 🙂

@HebaruSan HebaruSan merged commit 897b789 into KSP-CKAN:master Mar 11, 2023
@HebaruSan HebaruSan deleted the fix/windows-double-ampersand branch March 11, 2023 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Easy This is easy to fix GUI Issues affecting the interactive GUI Windows Issues specific for Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Ampersands doubled in mod grid on Windows
2 participants