[Mono-winforms-list] gnome white font color and mono WinForm issue..

Stifu stifu at free.fr
Thu Jan 7 09:39:55 EST 2010


Mauricio: you could just add a runtime condition.
Like: if (Type.GetType("System.MonoType", false) != null) { Form1.ForeColor
= Color.Black; }

Carlos: not just the ToolStrip, from what he says, but all controls.


Carlos Alberto wrote:
> 
> Not in the last release sadly, as it was committed after the release. So I
> take for granted is only happening with ToolStrip?
> 
> One possible workaround is to set DESKTOP_SESSION to any string starting
> with 'KDE' - this way our theme engine will try to detect the KDE settings
> (will print a warning if it couldn't find the libs). This way the winforms
> app will not be loading the gnome settings, and it should work 'fine'
> (remember to set this env var only in the terminal where you execute your
> winforms app ;-) ) Try something like:
> 
> env DESKTOP_SESSION=KDE mono MyApp.exe
> 
> Carlos.
> 
> 2010/1/7 buhochilenoi at gmail.com <buhochileno at gmail.com>
> 
>>  On 01/07/2010 11:05 AM, Carlos Alberto Cortez wrote:
>>
>> We had an issue but it was only happening for ToolStrip menus. Is that
>> the
>> case, or is it happening with other controls as well?
>>
>> yeap, all kind of winform controls like texboxes, menus, labels, etc...
>>
>> I remember testing extensively with dark themes and the only issue was
>> related to ToolStrip (which has been fixed in 2.4/2.6/trunk, but didn't
>> make
>> it in the version you have).
>>
>> As Stifu mentioned, you can force the controls using the ForeColor
>> property
>> (that applies as well for ToolStrip). Otherwise, there's no way to force
>> our
>> theme engine to *not* detect the system colors unfortunately (given a
>> gnome
>> session running).
>>
>> sadly is a complex and large app to change the code to force a forecolor,
>> and is not ideal to change the code just for that since the current code
>> works ok on windows with .net and themes, so it going to need compiler
>> conditions, etc..
>>
>> So, this supose to be fixed in mono 2.6 then?
>>
>> thanks
>>
>> Mauricio
>>
>>
>>
>> Carlos.
>>
>> 2010/1/7 buhochilenoi at gmail.com <buhochileno at gmail.com>
>>
>>> Hi guys,
>>>
>>> I have strage behaviour of mono Winform in a gnome theme that put most
>>> of
>>> the font colour used by the system in white.
>>>
>>> The gnome theme is mostly black, so all of the fonts in the desktop are
>>> white (gnome bar, menus and so on...), the problem is when I run a mono
>>> winform app, since the mono winform windows don't take the gnome theme
>>> (it
>>> don't get blackish it keeps the regular winform colors), but the winform
>>> fonts it do take the white colour of the gnome theme and of course white
>>> on
>>> a gray winfor window is hard to see/read...
>>>
>>> So, I know that mono winform currently don't apply the gnome theme,
>>> that's
>>> ok, but I want that the winform don't take the font color neither to
>>> keep
>>> the regular black font color in the gray winform window.
>>>
>>> any way to chage/force that?, or I forced to use a black font theme...?
>>>
>>> I currently using mono and libgdiplus at version 2.4.2-3 on a fedora 12
>>> machine...
>>>
>>> Thanks.
>>>
>>> Mauricio
>>>
>>>
>>> P.S: Please don't tell me to update to mono 2.6 to see if is fixed :-)
>>>
>>> _______________________________________________
>>> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>>>
>>>
>>
>>
>> _______________________________________________
>> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>>
>>
> 
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
> 
> 

-- 
View this message in context: http://old.nabble.com/gnome-white-font-color-and-mono-WinForm-issue..-tp27060097p27060992.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.



More information about the Mono-winforms-list mailing list