GTK-3.0 Themes - discussion, demos
Posted: Mon 01 Apr 2013, 21:32
Disclaimer
Puppy uses GTK-2.0 only as standard. This will not likely change in the immediate future. This info is provided FYI only and is "as is". ***NO WARRANTY***
Thunor has introduced gtk-3.0 support into gtkdialog and also briefly discussed themes. Thanks Thunor!
This thread is to discuss, improve and whatever else to do with gtk-3.0 support in puppy. to keep pollution out of the gtkdialog thread.
I have some tools to get you started
Download link
In there there is:
-------------------------------------------------------------------------------------------------------
GTK3 themes use style sheets (css). Here's some info. Search for more.
--------------------------------------------------------------------------------------------------------
Here is a really basic script demonstrating how you can theme on the fly if you have a certain app that needs it's own theme (think along the lines of gtkdialog-splash).
NOTE: only a demo, and also I rename the executable to gtk3dialog, you do what you see fit.
As usual.. have fun!
Puppy uses GTK-2.0 only as standard. This will not likely change in the immediate future. This info is provided FYI only and is "as is". ***NO WARRANTY***
Thunor has introduced gtk-3.0 support into gtkdialog and also briefly discussed themes. Thanks Thunor!
This thread is to discuss, improve and whatever else to do with gtk-3.0 support in puppy. to keep pollution out of the gtkdialog thread.
I have some tools to get you started
Download link
In there there is:
- a hacked pet for chtheme, the prog we use to change gtk themes in puppy.. Thanks to pemasu for improvements. I have no idea if it works in Lupu, Racy whatever other than Slacko and I believe Upup-Raring.
- some pets built by Thunor and myself for themes. There are some gtk-2.0 ones there, also some require clearlooks and murrine engines. Note, clearlooks is cut down, so if you want the full version make it yourself, Note: pets compiled in slacko so YMMV in other based pups. I'm sure some distro devs will pop in soon with links to distro specific themes/engines whatever.
- Note: you will get many errors in your xerrs.log as many themes are incompatible with different versions of gtk3. Messy? Yes! Those skilled in CSS may want to go through and tidy some themes up, or roll your own. Not that difficult.
-------------------------------------------------------------------------------------------------------
GTK3 themes use style sheets (css). Here's some info. Search for more.
--------------------------------------------------------------------------------------------------------
Here is a really basic script demonstrating how you can theme on the fly if you have a certain app that needs it's own theme (think along the lines of gtkdialog-splash).
NOTE: only a demo, and also I rename the executable to gtk3dialog, you do what you see fit.
Code: Select all
#!/bin/sh
# test for a new idea for on the fly gtk3 theming
ORIG_XDG=$XDG_CONFIG_HOME
[ -d /tmp/gtk3-theme/gtk-3.0 ] || mkdir -p /tmp/gtk3-theme/gtk-3.0
XDG_CONFIG_HOME=/tmp/gtk3-theme
echo $XDG_CONFIG_HOME
text="$1"
color="$2"
fontsize="$3"
[ "$text" ] || text="Hello World"
[ "$color" ] || color=red
[ "$fontsize" ] || fontsize=20
cat > /tmp/gtk3-theme/gtk-3.0/gtk.css <<_THEME
@define-color bg_color $color;
* {
background-color: @bg_color;
font: Dejavu Sans $fontsize;
}
_THEME
echo "<vbox>
<text><label>\"$text\"</label></text>
<hbox><button ok></button></hbox>
</vbox>"|gtk3dialog -s -c
XDG_CONFIG_HOME=$ORIG_XDG
echo $XDG_CONFIG_HOME