Eto Button wrong layout when displayed on external screen

Hello, I’m developing a plugin Panel on Rhino Mac using Eto.Forms.
All is fine except for an Eto.Button that behaves weirdly when displayed on an external screen rather than the native Mac Retina Display.

The button is part of a TableLayout. All other components are arranged as I am expecting, except for the button.

Here is how it looks like on native Retina Display (2880 x 1800 px):
Screenshot 2020-11-16 at 13.34.06

Here is how it looks like on an external screen (1920 x 1080 px):
Screenshot 2020-11-16 at 13.34.22

I tried to search the documentation to understand how Eto.Forms deals with different screen resolutions but I couldn’t find any useful information.

Any ideas? thank you

Hey @p.stragliotto,

That is probably an issue due to setting the Button’s BackgroundColor property. macOS doesn’t intrinsically support this so Eto has special code to “colorize” the control, which probably has an issue with mixing retina and non-retina screens so it draws incorrectly. I’ve created RH-61544 to get that fixed up.

Regardless, I would suggest using the ColorPicker control which provides a better experience to pick colors and shouldn’t have this problem.

Hope this helps!

Ah my bad!
I was trying to manually implement the ColorPicker with a Button and a ColorDialog.
Using the ColorPicker solves the issue.

Thank you @curtisw for the quick reply.

1 Like