compnerd/swift-win32

Labels appear cropped if display scaling is enabled

egorzhdan opened this issue · 2 comments

If I enable 200% scaling in the Windows display settings, labels produced by Swift/Win32 appear cropped in half.

Normally scaling is handled by View.frame.didSet:

ScaleClient(rect: &client, for: GetDpiForWindow(self.hWnd),

However, the Label component creates a WC_STATIC subcomponent with a non-scaled frame:

Hmm, I guess for the tests we could just interposition the query functions and replace the returned value. Either way, it would be nice to be able to test this, but we should just fix this in the mean time.

This has been addressed. It would still be good to be able to test this.