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

Fix YesNoDialog layout #2530

Merged
merged 1 commit into from
Oct 7, 2018
Merged

Conversation

HebaruSan
Copy link
Member

Background

When you launch CKAN for the very first time (or after clearing the relevant settings from CKAN/GUIConfig.xml), two popups appear to "nag" the user about making certain decisions:

image

image

Problem

As shown above, the second popup's buttons are cut off and unreadable if you have this setting turned on in Windows:

image

Cause

Since AskUserForAutoUpdatesDialog works fine regardless of the above setting, I focused on what was different between the two. There are several differences that seem to affect whether the layout is shown correctly (see next section).

Changes

Now YesNoDialog works more like AskUserForAutoUpdatesDialog:

  • It's a FixedToolWindow instead of a FixedDialog
  • It has a close X button
  • Its StartPosition is set in its .Designer.cs file instead of the ... other? file (whatever it's called in C#)
  • It calls PerformLayout at the end of its .Designer.cs file
  • It doesn't use the ApplyFormCompatibilityFixes hack anymore, since it doesn't seem to do anything

This seems to fix the problem:

image

And AskUserForAutoUpdatesDialog works a little bit more like YesNoDialog, for consistency:

  • The button style is now non-flat

image

Fixes #908.

@HebaruSan HebaruSan added Bug Something is not working as intended GUI Issues affecting the interactive GUI Pull request Windows Issues specific for Windows labels Oct 2, 2018
@politas politas merged commit 26d3f35 into KSP-CKAN:master Oct 7, 2018
politas added a commit that referenced this pull request Oct 7, 2018

Verified

This commit was signed with the committer’s verified signature.
@HebaruSan HebaruSan deleted the fix/yes-no-layout branch October 7, 2018 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended GUI Issues affecting the interactive GUI Windows Issues specific for Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dialog sizing wrong on Windows 7
2 participants