[Mono-winforms-list] Theming in MWF
Pedro Martínez Juliá
pedromj at gmail.com
Fri Jul 29 08:52:40 EDT 2005
First I think we need to finish a working implementation of all SWF
controls (1.0 and as much as we can from 2.0). The "look & feel" can be
provided later.
There are a lot of ways to implement the theming support, the actual
implementation of theming is not bad idea but I recommend not to support
a lot of themes, only few statically binded ones: SWF and Gtk, for
example. Then we'll have all gtk themes plus windows one without the
extra layer.
Gtk themes change the look of all widgets but windows themes changes
only a few things (I don't know what things, but it doesn't change the
draw of the buttons, as I think).
Regards,
Pedro
El vie, 29-07-2005 a las 12:00 +0100, Vladimir Lushnikov escribió:
> Hi,
>
> Surely native theming is an option - Java has its SWING toolkit that
> does native theming and more, and who would want a Win98 look of your
> app on Mac OS X. If someone suggested why even use MWF - then the
> answer would be because it's easy, and it uses one of the most
> powerful IDE's to date - Visual Studio 2005. If we had "proper"
> theming support then I would imagine more people would use MWF on
> Linux (for example).
>
> Myself, I took a look at the look of MWF on Linux, and was horrified
> at how it contrasts with other applications. Personally, I would
> prefer to have native look in MWF, but if that's not possible, then I
> will have to (for my project) use MWF for windows, GTK for Linux and
> maybe the native Cocoa calls in OS X.
>
> I'm not suggesting that the current implementation is not feature-rich
> or indeed, good enough to use, but unless wxWidgets (the native C++
> library) becomes an integral part of Mono, I think it's up to the MWF
> to make native widgets, or indeed, themable widgets. And no,
> personally I will never use wxWidgets because it's a dependency - and
> the aim of my app is to have as little dependencies as possible.
>
> Regards,
>
> On 29/07/05, Kornél Pál <kornelpal at hotmail.com> wrote:
> > Hi,
> >
> > MS.NET has no theming support. Theming means that it would be able to draw
> > contorls and/or windows using custom functions. There is no such support in
> > MS.NET.
> >
> > It has an Application.EnableVisualStyles method that enables using Visual
> > Styles. Visual Styles are provided by Windows not by MS.NET.
> >
> > All that Application.EnableVisualStyles does is that it loads comctl32.dll
> > version 6.0.0.0 using a manifest file through Windows side-by-side assembly
> > support and the initializes comctl32.dll.
> >
> > By default controls are drawn by MS.NET so you have to use FlatStyle.System
> > to let Windows draw the controls using visual styles.
> >
> > For more information see:
> > EnableVisualStyles:
> > http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwindowsformsapplicationclassenablevisualstylestopic.asp
> >
> > Visual Styles:
> > http://msdn.microsoft.com/library/en-us/dnwxp/html/xptheming.asp
> >
> > Side-by-side Assemblies:
> > http://msdn.microsoft.com/library/en-us/sbscs/setup/about_isolated_applications_and_side_by_side_assemblies.asp
> >
> > Mono draws contorls itself (just like MS.NET) that provides identical
> > appearance across all platforms.
> >
> > Enabling custom themes is a good idea but it cannot be done in MWF because
> > it has to be compatible with MS.NET implementations.
> >
> > Kornél
> >
> > ----- Original Message -----
> > From: "Pedro Martínez Juliá" <pedromj at gmail.com>
> > To: "Mono Winforms" <mono-winforms-list at ximian.com>
> > Sent: Friday, July 29, 2005 12:31 PM
> > Subject: [Mono-winforms-list] Theming in MWF
> >
> >
> > >
> > > Hi,
> > >
> > > I've seen the implementation of themes in MWF and I'm not agree at all
> > > of having theming in this stage of the development. I know that MS.NET
> > > has themes but I think that themes are implemented in Windows because I
> > > didn't see anything related in MSDN documentation.
> > >
> > > I saw that Theme.cs has a lot of painting logic and I think it shouldn't
> > > be there. For example, DataGridPaintRows iterates the rows of a datagrid
> > > to paint each one. I think that it should be in DataGrid and not in the
> > > theme class.
> > >
> > > The problems I see in this issue is that I can implement a Theme that
> > > changes the view of any control and in the other hand, this theming
> > > engine doesn't allow a user to easily download and install a theme.
> > >
> > > At the end, we have only Win32Classic theme maintained and it adds one
> > > level to the indirection at the time to paint any control.
> > >
> > > For all of this I think we can redesign now the theming. It's only an
> > > idea.
> > >
> > > Regards,
> > >
> > > Pedro
> > >
> > > --
> > > Pedro Martínez Juliá
> > > \ pedromj at gmail.com
> > > )| Jabber: petrux at jabber.org
> > > / MSN Messenger: yoros at wanadoo.es
> > > Socio HispaLinux #311
> > > Página web: http://pedromj.dyndns.org
> > > Usuario Linux #275438 - http://counter.li.org
> > >
> > > _______________________________________________
> > > 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
> >
>
>
--
Pedro Martínez Juliá
\ pedromj at gmail.com
)| Jabber: petrux at jabber.org
/ MSN Messenger: yoros at wanadoo.es
Socio HispaLinux #311
Página web: http://pedromj.dyndns.org
Usuario Linux #275438 - http://counter.li.org
More information about the Mono-winforms-list
mailing list