(I am working against the mono/xwt GitHub repo on commit 6b86f3f [June 5, 2014 at 9:21:39 AM PDT])
I found a very strange Mac-specific issue where the text of a Label
gets stretched. (Example below.)
The following conditions will replicate this behavior:
- Label within a VBox
- BackgroundColor set on the VBox
- Include Mono runtime (no linking) in project options
- Xwt.Mac (Xwt.XamMac for including Mono runtime)
Initially the text looks normal, but as soon as you start resizing the Label via its container, it stretches.
If the BackgroundColor is not set on the VBox or the Mono runtime is not included the stretching will not occur.
If you set the Label.Text after stretching has occurred it will go back to normal.
I also noticed that setting VBox.BackgroundColor causes NSView.WantsLayer = true on line 389 in ViewBackend.cs (Xwt.Mac). According to Apple documentation, this "Specifies whether the receiver and its subviews use a Core Animation layer as a backing store." This might be a key item for this issue. If you comment out lines 388-390 the stretching does not occur.
Does anyone have any ideas about what could be causing this behavior? Thanks in advance.