RE: How to apply a theme to a perl gtk program

I use the theme selector available here: , the file you want is gtk2-themes-2009-09-07-ash.exe


Install this into the directory which you have installed Perl (on my system the path is C:\camelbox).


I ship my entire perl directory with my application â so the end user will have the themes installed. You can then give the user access to the C:\<perl path>\gtk2_prefs.exe where they can change the look and feel of all Gtk2 apps on their system - OR â to force your application to load a particular theme, use this code early in your program, replacing âUnityâ with whatever theme you wish to:


my $modÂÂ = Gtk2::RcStyle->new;



gtk-theme-name = "Unity"

style "user-font"


ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ font_name="Sans 10"


widget_class "*" style "user-font"






From: gtk-perl-list-bounces gnome org [mailto:gtk-perl-list-bounces gnome org] On Behalf Of Dan
Sent: Monday, April 12, 2010 5:23 AM
To: Xi Yang
Cc: gtk-perl-list gnome org
Subject: Re: How to apply a theme to a perl gtk program


On Mon, 12 Apr 2010 02:00:04 +0000, Xi Yang <jiandingzhe msn com> wrote:

In platforms running in Gnome desktop, a perl Gtk program will have the native look, using the theme currently used by Gnome. However, while the script is running in windows, the default skin is boring. So, how to let a perl-gtk program use some theme other than default one?

I've had problems with this too. The best luck I've had is with Alex Shaduri's packages at: and ActiveState's Perl. Alex's packages have some decent themes and also a theme chooser.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]