Author |
Message |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Mon 01 Apr 2013, 17:32 Post subject:
GTK-3.0 Themes - discussion, demos Subject description: experimental stuff |
|
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:
- 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.
There will be no hand holding here. You are on your own to a certain degree.
-------------------------------------------------------------------------------------------------------
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: | #!/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
|
As usual.. have fun!
Description |
|
Filesize |
4.56 KB |
Viewed |
2062 Time(s) |

|
_________________ Puppy Linux Blog - contact me for access
Last edited by 01micko on Mon 01 Apr 2013, 21:08; edited 2 times in total
|
Back to top
|
|
 |
pemasu

Joined: 08 Jul 2009 Posts: 5484 Location: Finland
|
Posted: Mon 01 Apr 2013, 18:02 Post subject:
|
|
Hi 01micko. I tested your revisited gtk_chtheme_wrapper. It didnt work for me until I changed the gtk3 part as below:
Code: | if [ "$GTK3THEME" ];then
[ -h ${XDG_CONFIG_HOME}/gtk-3.0 ] && rm -f ${XDG_CONFIG_HOME}/gtk-3.0
ln -s "$GTK3THEME" ${XDG_CONFIG_HOME}/gtk-3.0
fi |
then the symlink swapping to the new choice worked.
I attach my found Gtk2-gtk3 matching themes
I am gonna include that Shimmer ie birdies themes....Graybird one to next Upup Raring as default theme for gtk3. It needs gtk2 murrine engine...no need for gtk3 engine. It is close enough of gtk2 Aurora2 theme.
Murrine engine is not included in the pet.
The theme name Shimmer comes from the Ubuntu repo naming....in fact there is Graybird, Bluebird, Blackbird and Albatross gtk2 and gtk3 themes.
Cheers
Description |
|

Download |
Filename |
shimmer-themes-gtk2-gtk3-murrine-engine-dependent-0.0.1.pet |
Filesize |
117.38 KB |
Downloaded |
425 Time(s) |
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Mon 01 Apr 2013, 18:11 Post subject:
|
|
Code: | if [ "$GTK3THEME" ];then
[ -h ${XDG_CONFIG_HOME}/gtk-3.0 ] && rm -f ${XDG_CONFIG_HOME}/gtk-3.0
ln -s "$GTK3THEME" ${XDG_CONFIG_HOME}/gtk-3.0
fi |
pemasu, that is already in the pet! (not an edit ). I only just uploaded it.
01micko wrote: | a hacked pet for chtheme, the prog we use to change gtk themes in puppy.. Thanks to pemasu for improvements. |
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
simargl
Joined: 11 Feb 2013 Posts: 572
|
Posted: Mon 01 Apr 2013, 18:19 Post subject:
|
|
.
Last edited by simargl on Sun 01 Sep 2013, 11:00; edited 1 time in total
|
Back to top
|
|
 |
pemasu

Joined: 08 Jul 2009 Posts: 5484 Location: Finland
|
Posted: Mon 01 Apr 2013, 18:21 Post subject:
|
|
Code: | if [ "$GTK3THEME" ];then
[ -h ${XDG_CONFIG_HOME}/gtk-3.0 ] && rm -f ${XDG_CONFIG_HOME}/gtk-3.0/
ln -s "$GTK3THEME" ${XDG_CONFIG_HOME}/ HERE I ADDED folder
fi |
I had to add to this revisited code the gtk-3.0 folder
It might be my setup which had that need. Anyway...not sure...so I posted.....
The code stucture was a little different in Barry`s upload, this one needed the gtk-3.0 folder addition.
I got this before adding that folder to the end of the line:
Quote: | rm: cannot remove ‘/root/.config/gtk-3.0/’: Is a directory
ln: failed to create symbolic link ‘/root/.config/gtk-3.0’: File exists |
Last edited by pemasu on Mon 01 Apr 2013, 18:34; edited 1 time in total
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Mon 01 Apr 2013, 18:26 Post subject:
|
|
I see your point, but because this is more to do with theming I think I'll leave it, maybe change the wording.
Edit: ok put the link on "themes", not "gtkdialog".
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Wed 03 Apr 2013, 07:24 Post subject:
|
|
I'm just going to jot some stuff down here as I come across it in the GTK+ 3 Reference Manual.
These are the styling priorities (topmost has highest priority):
GTK_STYLE_PROVIDER_PRIORITY_USER
The priority used for the style information from ~/.gtk-3.0.css (unfortunately I haven't managed to get this to work and it would've been the CSS equivalent to ~/.gtkrc-2.0).
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
A priority that can be used when adding a GtkStyleProvider for application-specific style information (this translates to using a C function to load a style sheet which I currently have working but I haven't committed it to the gtkdialog repository yet).
GTK_STYLE_PROVIDER_PRIORITY_SETTINGS
The priority used for style information provided via GtkSettings (this translates to the files within /etc/gtk-3.0/ or $XDG_CONFIG_HOME/gtk-3.0/ i.e. settings.ini and gtk.css where $XDG_CONFIG_HOME is ~/.config by default).
GTK_STYLE_PROVIDER_PRIORITY_THEME
The priority used for style information provided by themes (i.e. the files within /usr/share/themes/Adwaita/gtk-3.0/ or ~/.themes/Adwaita/gtk-3.0/).
GTK_STYLE_PROVIDER_PRIORITY_FALLBACK
The priority used for default style information that is used in the absence of themes (i.e. the horrid very thick very square very grey look).
There is a reference to ~/.gtkrc-3.0 here but I didn't get it to work and it does say that it's been deprecated and replaced by CSS presumably by ~/.gtk-3.0.css which doesn't work either
|
Back to top
|
|
 |
Mobeus

Joined: 26 Aug 2010 Posts: 94
|
Posted: Wed 03 Apr 2013, 16:00 Post subject:
|
|
If Puppy is to support gtk3 then maybe it would be a good idea to lock in to a specific gtk3 version and stay there. The reason I say this is that after reading up on themes it seems there are a lot of gnome theme creators that have given up in disgust over the way gtk3 theme support is being broken from version to version, even from 3.6.0 to 3.6.1 apparently. Some even say it is deliberate. Maybe that is why so few themes exist for gtk3 even though it is at v 3.8.0?
I don't know, just my 2 cents
_________________ /root for the home team
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Wed 03 Apr 2013, 17:02 Post subject:
|
|
@Thunor
Thanks for those thoughts and links.
I uploaded a new version of the chtheme pet yesterday that has a really simple method to at least find the background colour in a gtk-2.0 theme that has no gtk-3.0 equivalent (example: our home-grown themes) and apply that to settings.ini using Adwaita's settings.ini as a template. It's not fancy but at least gives some consistency as far as background colour goes. It uses a default "gray" for the widgets, like I said, not fancy!
@Mobeus.
Nice thought but impractical given that every different woofed puppy version (ie slacko based on slackware-14.0, upup based on precise and raring) will get the native gtk3 version respective to it's parent distro, obviously all different.
I did fix one theme for slacko, MediterraneanTributeBlue (see cap) and boy wasn't that a chore! Won't happen again . I'll attach it, ymmv outside of Slacko 5.5 and derivatives. The package also includes the gtk-2.0 theme dependent upon murrine engine.
 |
Description |
|

Download |
Filename |
MediterraneanTributeBlue-0.1.tar.bz2 |
Filesize |
72.4 KB |
Downloaded |
396 Time(s) |
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
simargl
Joined: 11 Feb 2013 Posts: 572
|
Posted: Fri 05 Apr 2013, 12:25 Post subject:
|
|
.
|
Back to top
|
|
 |
|