mono/mono

MONO_THEME and MONO_VISUAL_STYLES do nothing.

Open

#7,268 opened on Feb 25, 2018

View on GitHub
 (2 comments) (0 reactions) (0 assignees)C# (3,813 forks)batch import
area-BCL: System.Windows.Formshelp wanted

Repository metrics

Stars
 (11,435 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Steps to Reproduce

  1. If you want to be absolutely sure, be running Arch Linux, extra/mono 5.4.1.7-2. But I've pointed out the relevant code, and this should be pretty universal.
  2. Set MONO_THEME to, say, "win32" or "Win32Classic" to try and disable SystemColours for application compatibility. Run application (Mesen in this case).
  3. See nothing.
  4. Try to set it to "gtk" to see if any effect occurs at all. Run application.
  5. See nothing. (And look at relevant code to find said code does nothing with the variable.)
  6. Find out about MONO_VISUAL_STYLES. Set it to "no" just to try and stop GTK, run application.
  7. See nothing. (And look at relevant code to try and find valid values. Similarly to MONO_THEME, does nothing.)

Solution would likely be for ThemeEngine to do something with theme_var - right now, it does nothing, and for VisualStyles to do the same.

Regarding VisualStyles, yes, I know it does something at runtime if VISUAL_STYLES_USE_GTKPLUS_ON_WINDOWS is off. But if that flag is on, it can't be disabled at runtime, and it's effects in GtkPlus.cs - changing library names - are probably not optimal anyway (should probably just refer to WINDOWS in that case or somesuch?). My current workaround is to just make Mono unable to get at GTK-2, because the alternative is unusable applications. (Which, to be fair, likely break on Windows with these theme settings. It's just the lack of a way to work around them.)

Current Behavior

MONO_THEME is ignored by ThemeEngine, but not by ThemeElements (though this doesn't really change much because ThemeElements has near-zero effects), and MONO_VISUAL_STYLES never does anything at all.

Expected Behavior

Setting MONO_THEME should have a visible effect on current theming, such as allowing the disabling of VisualStyles to return to a more compatible colour scheme. While MONO_VISUAL_STYLES did solve the issue, it still remains that theming is completely uncontrollable right now. (Also, it'd be nice if MONO_VISUAL_STYLES and MONO_THEME were better-documented.)

On which platforms did you notice this

[ ] macOS [X] Linux [ ] Windows

Version Used:

Mono JIT compiler version 5.4.1 (makepkg/e66d9abbb27 Thu Nov 9 22:28:33 CET 2017) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: normal Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: sgen (concurrent by default)

Stacktrace

None.

Contributor guide