picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.57k stars 325 forks source link

[custom theming] Background color in toolbars and menus and text color in TabPage? #2462

Open Serg-Norseman opened 1 year ago

Serg-Norseman commented 1 year ago

[custom theming] Is it possible to develop the background color in toolbars and menus (including the context menu) and text color in TabPage?

cwensley commented 1 year ago

Hey @Serg-Norseman, theming of existing controls needs to be done on a per-platform basis.

E.g. WPF you'd add WPF xaml styles to the window or application, GTK you'd use custom CSS styling, and on macOS you're out of luck.

An alternative would be to create a custom appearance via a Drawable and hooking it up via a themed handler (like one of the built-in themed controls), which would work on all platforms.

Hope this helps.

Serg-Norseman commented 1 year ago

I don't quite understand.

Most Eto.Forms components have background color properties available, as well as text color. To implement support for themes, in my case, only the specified things are missing - the background color of the toolbar and menu, as well as the color of the text of the tabs. Which are absent, contrary to what is in most other components.

Of course, I can do this through the styles of the platforms, but in relation to the missing one, it is not clear why exactly this is missing. The logic is not obvious.