Issue by adamkennedy
_Sunday Mar 01, 2015 at 22:03 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT_
_Originally opened as https://github.com/KSP-CKAN/CKAN-support/issues/98_
The very first dialog I get when running ckan.exe is the following...

D'oh. I don't suppose you have a CKAN version this applies to?
(Also, hi!)
Can you still reproduce it on Windows 7?
Can reproduce on Windows 8.1 on newest version (v1.25.3)

Probably caused by high DPI setting
For comparison, here it is on Linux:

Presumably that's the environment in which this popup was initially developed and tested. Windows does some misleading stuff with window dimensions to make room for its title bar (seen on unrelated projects and platforms).
Relevant code references:
https://github.com/KSP-CKAN/CKAN/blob/e825bdef9d52a4117e37acf6b6b74da216ee4567/GUI/MainRepo.cs#L113-L118
This looks suspicious:
Scaling by Font is useful if you want to have a control or form stretch or shrink according to the size of the fonts in the operating system, and should be used when the absolute size of the control or form does not matter.
The absolute size does matter in this case because the buttons are absolutely positioned controls.
Same dialog on Windws 8.1 but with default (96) DPI setting:

I just noticed there's already a hack in place related to form heights on Windows:
So whatever we do here would have to account for that and avoid conflicting with it.
EDIT: Commenting out ApplyFormCompatibilityFixes has no effect! So this hack does nothing.
Thanks for those screenshots! Putting them side by side, they're exactly the same height, but the "high DPI" one has a bigger font, greater width, slightly bigger title bar, and its controls are shifted downward.
@antipin00, exactly where is the high DPI setting that controls this? I want to make sure I change the right thing when I reboot into Windows later to check this out.
@HebaruSan, Control Panel -> All Control Panel Items -> Display. And I'd recommend to reboot after changing it, not just log off. That 'high DPI' screenshot is with 'Medium - 125%', by the way