http://bugs.winehq.org/show_bug.cgi?id=59602 --- Comment #3 from matthias.klaey@gmx.ch <matthias.klaey@gmx.ch> --- Workaround good enough to handle composite/nested controls: ``` /// <remarks> /// Works around https://bugs.winehq.org/show_bug.cgi?id=59602 by scaling nested children /// in case of <see cref="BoundsSpecified.Location"/>, rather than skipping: /// https://gitlab.winehq.org/mono/mono/-/blob/main/mcs/class/System.Windows.For... /// </remarks> [Conditional("MONO")] public static void ApplyMonoScaleChildrenWorkaround(Control.ControlCollection controls, SizeF factor, BoundsSpecified specified, bool scaleChildren) { if ((specified == BoundsSpecified.Location) && scaleChildren) { foreach (Control c in controls) c.Scale(factor); } } ``` Workaround has to be applied to the top-level composite control: ``` #if (MONO) protected override void ScaleControl(SizeF factor, BoundsSpecified specified) { base.ScaleControl(factor, specified); SuspendLayout(); ControlEx.ApplyMonoScaleChildrenWorkaround(Controls, factor, specified, ScaleChildren); ResumeLayout(); } #endif ``` The workaround does not work for forms, e.g. MDI child forms. For such, call `Scale()` on all composite controls: ``` #if (MONO) protected override void ScaleControl(SizeF factor, BoundsSpecified specified) { base.ScaleControl(factor, specified); SuspendLayout(); someControl.Scale(factor); ResumeLayout(); } #endif ``` -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.