Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 23 Nov 2014, 14:56
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
GTK-3.0 Themes - discussion, demos
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: 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!
capture4353.png
 Description   
 Filesize   4.56 KB
 Viewed   1399 Time(s)

capture4353.png


_________________
Woof Mailing List | keep the faith Cool |

Last edited by 01micko on Mon 01 Apr 2013, 21:08; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
pemasu


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: 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
shimmer-themes-gtk2-gtk3-murrine-engine-dependent-0.0.1.pet
Description 
pet

 Download 
Filename  shimmer-themes-gtk2-gtk3-murrine-engine-dependent-0.0.1.pet 
Filesize  117.38 KB 
Downloaded  249 Time(s) 
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: 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 Wink ). 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.


Smile

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
simargl

Joined: 11 Feb 2013
Posts: 572

PostPosted: 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
View user's profile Send private message Visit poster's website 
pemasu


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: 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
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: Mon 01 Apr 2013, 18:26    Post subject:  

simargl wrote:
Just one suggestion: in first post you linked "Thunor has introduced gtk-3.0 support into gtkdialog" to this post
http://murga-linux.com/puppy/viewtopic.php?p=695722#695722

instead of what is correct
http://murga-linux.com/puppy/viewtopic.php?p=695399#695399


I see your point, but because this is more to do with theming I think I'll leave it, maybe change the wording. Wink
Edit: ok put the link on "themes", not "gtkdialog".

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: 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 Smile 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 Razz
Back to top
View user's profile Send private message Visit poster's website 
Mobeus


Joined: 26 Aug 2010
Posts: 94

PostPosted: 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
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: 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 Laughing . 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.
MediterraneanTributeBlue-0.1.tar.bz2
Description 
bz2

 Download 
Filename  MediterraneanTributeBlue-0.1.tar.bz2 
Filesize  72.4 KB 
Downloaded  222 Time(s) 

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
simargl

Joined: 11 Feb 2013
Posts: 572

PostPosted: Fri 05 Apr 2013, 12:25    Post subject:  

.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0878s ][ Queries: 13 (0.0075s) ][ GZIP on ]