Bug 2908 - Hard to distinguish disabled from enabled controls
Summary: Hard to distinguish disabled from enabled controls
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: master
Hardware: PC Linux
: Lowest normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-01-16 06:53 UTC by eb1
Modified: 2012-10-04 06:08 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Screenshot on mono (master branch) (19.73 KB, image/png)
2012-01-16 06:53 UTC, eb1
Screenshot on Windows (.NET) (11.07 KB, image/jpeg)
2012-01-16 06:54 UTC, eb1
Sample application used in screenshots (5.56 KB, application/x-zip-compressed)
2012-01-16 06:56 UTC, eb1
Proposed fix (3.98 KB, patch)
2012-01-18 02:58 UTC, eb1
Screenshot .NET / Mono (50.00 KB, image/png)
2012-06-18 16:00 UTC, Thomas Goldstein
Screenshot 2 Mono (30.25 KB, image/png)
2012-06-19 16:24 UTC, Thomas Goldstein

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description eb1 2012-01-16 06:53:16 UTC
The fix for #867 made it very hard to distinguish enabled from disabled controls. For example enabled checkboxes are drawn with a darker background than disabled ones (see screenshots).
Comment 1 eb1 2012-01-16 06:53:59 UTC
Created attachment 1198 [details]
Screenshot on mono (master branch)
Comment 2 eb1 2012-01-16 06:54:34 UTC
Created attachment 1199 [details]
Screenshot on Windows (.NET)
Comment 3 eb1 2012-01-16 06:56:22 UTC
Created attachment 1200 [details]
Sample application used in screenshots
Comment 4 Miguel de Icaza [MSFT] 2012-01-16 14:56:20 UTC
Would you be interested in trying to provide a patch?
Comment 5 eb1 2012-01-18 02:58:48 UTC
Created attachment 1221 [details]
Proposed fix
Comment 6 Thomas Goldstein 2012-06-18 16:00:40 UTC
Created attachment 2079 [details]
Screenshot .NET / Mono

I cannot confirm that enabled checkboxes are draw with a darker background than disabled ones. I'm thinking I may not see the same thing as you because we're not on the same theme, and so we must have different default colors.

Attached is what I see.
Top: .NET
Middle: Unpatched (left) and patched (right) Mono on Windows 7
Bottom: Unpatched (left) and patched (right) Mono on Ubuntu 12.04

Your patch seems to make some things better for me, such as the ControlLight color now being darker than the background, on Ubuntu. The disabled texts now look more washed out / flatter, though, and more different from .NET.
Comment 7 Thomas Goldstein 2012-06-19 14:44:50 UTC
Sorry, I was wrong. I compared Mono 2.10 to Mono master patched, rather than Mono master unpatched and Mono master patched. With Mono master unpatched, I can confirm these issues (not on Windows, though, Linux only).

The patch looks fine, apart from the disabled text which is not an improvement. At the moment, disabled text strings are drawn twice to give some kind of 3D / depth effect (same as .NET), which is no longer the case after your patch.
Comment 8 Thomas Goldstein 2012-06-19 16:24:55 UTC
Created attachment 2087 [details]
Screenshot 2 Mono

Here are new screenshots.
Left: Mono master unpatched
Middle: Mono master with X11DesktopColors half of patch applied
Right: Mono master with full patch applied (X11DesktopColors and ThemeWin32Classic)

In my opinion, the middle one is the best of both worlds. It fixes color issues while not degrading the disabled text.

I suggest we just apply the modifications done to X11DesktopColors.cs. What do you guys think?
Comment 9 Miguel de Icaza [MSFT] 2012-06-19 16:55:27 UTC
I am fine with either the half or full patches applied
Comment 10 Thomas Goldstein 2012-06-20 02:09:10 UTC
Alright, thanks Miguel.
I've applied half of the patch (commit bddaaafea6c9d1cc29ee3ac8959e2b318ecb8d8a).

@eb1@sil.org: Thanks for the patch. As for ThemeWin32Classic, I'm not sure what you tried to fix in it, but feel free to explain or propose another patch for it. Or if you're happy with the way things are now, you may mark this bug report as fixed.