Unfortunately, the button does not appear to use native themes on my WinXP machine (SP3, GTK# installed with Mono 2.4.2.3).
On Wed, Sep 9, 2009 at 5:05 PM, Christian Hoff<christian_h...@gmx.net> wrote: > Hi folks, > > as you may have noticed, old Gtk# versions (< 2.12.8) did not use XP's > visual styles. Later versions have a workaround: they call > System.WIndows.Forms.Application.DoEvents which seems to enable XP's > theming. This workaround is far from optimal as it created a Winforms > dependency. > > That's why I tried to integrate the code of Application.DoEvents into Gtk# > directly. As I do not have a Windows XP machine to test, I cannot verify if > it works. > I have attached an assembly and it's source code (change extension to .exe; > GMail does not allow executables as attachments) that can be run with any > Gtk# 2.12 version on XP. It uses a tweaked Gtk.Application class with a new > mechanism to enable theming. > > I would really appreciate some feedback from the community as to whether the > new approach works (that is, if the attached application appears with visual > styles enabled). Just reply with a screenshot of the running app on XP if > you're not sure what I mean :-) . > > > Christian > > Mike Kestner wrote: >> >> On Sat, 2009-09-05 at 09:15 +0200, Christian Hoff wrote: >> >> >>>> >>>> In Windows I use 'mkbundle' [1] >>>> >>> >>> We should probably put that code in a try-block. What do you think, Mike? >>> >> >> My question would be, what do you do in the catch block? >> The winforms reflection thing is a huge hack, we know that, and the >> poster is tripping over it because of using mkbundle instead of >> depending on mono or .Net. >> >> We could also take the stance that if somebody wants to do this sort of >> minimal packaging, they are required to add an artificial ref to swf to >> ensure it gets bundled. But they won't have any clue that's required if >> we just silently fallback to unthemed windows when we can't find swf. >> >> According to Robert Jordan on this thread, it's a PeekMessage/GetMessage >> loop that's required to happen before the first handle is created. We >> should try a pinvoke solution like that and see if it works so we can >> remove the hack altogether instead of figuring out ways to make the hack >> more palatable. >> >> Mike >> >> > > > _______________________________________________ > Mono-devel-list mailing list > Mono-devel-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-devel-list > > _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list