[Gtk-sharp-list] Linux GTK themes on Windows

Andy York andy at brdstudio.net
Sat Aug 13 10:15:35 EDT 2011

Here is how I did it, for Gtk and KDE programming it is considered bad 
form to alter the users theme but the Windows theme is often not too 
good looking. It is worth noting that if you compile the app with VS or 
use the Windows .NET library for compiling it will take on the windows 
theme instead of the default Gtk theme.

// this is a Windows only option that specifies the theme
// the default Gtk themes for Windows is is just not something I feel can
// be relied on at the moment
  if (!string.IsNullOrEmpty(strPathToThemeFile))
     Gtk.Rc.Parse (strPathToThemeFile);
MainWindow win = new MainWindow ();
  win.Show ();
Application.Run ();

Hope this helps

On 8/13/2011 9:31 AM, pinggi at centrum.cz wrote:
> Hi, I'm using mono with GTK# + monodevelop on Windows platform.
> I want to create application that would look the same like it looks on 
> Ubuntu with Gnome.
> I like dark theme. However, I'm not able to change GTK# theme fully on 
> Windows.
> I downloaded Clearlooks-DarkLime theme from 
> http://art.gnome.org/themes/gtk2.
> It contains gtkrc file. That file is loaded by following code:
> string fileName = @"Clearlooks-DarkLimegtk-2.0gtkrc";
> Gtk.Rc.AddDefaultFile(fileName);
> Gtk.Rc.Parse(fileName);
> It works but not fully. Some controls don't look the same like on the 
> picture on control themes section on art.gnome.org. TextView 
> background and text inside is changed to gray shade according that 
> style, but button and scrollbar are not changed.
> Is that bug of gtk/mono? Or wrongly written theme file? Do you know 
> about some working one? I'd like to use dark theme for my app on Linux 
> and Windows and want it to be look exactly the same on both.
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

More information about the Gtk-sharp-list mailing list