Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Making GTK applications look good
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
sempsteen
n00b
n00b


Joined: 18 Jul 2006
Posts: 13

PostPosted: Mon Oct 13, 2008 6:26 pm    Post subject: Making GTK applications look good Reply with quote

Hi everyone,
Because I'm spending lots of time by using my computer appearance is very important for me. I'm a KDE user but not every application is built on KDE. My GTK based applications were looking bad but finally today I managed to fix it. I'm going to write here so that maybe it can help others like me. It is very easy.

First emerge these two packages:
    x11-themes/gtk-engines-qtcurve
    x11-themes/qtcurve-qt4


Then create a file named ".gtkrc-2.0" in your home directory put this line in it:
    include "/usr/share/themes/QtCurve/gtk-2.0/gtkrc"


That's all!

References:
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2672
Location: here, there or in transit

PostPosted: Thu Oct 16, 2008 3:24 am    Post subject: Reply with quote

Moved from Desktop Environments to Documentation, Tips & Tricks.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
notHerbert
Advocate
Advocate


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Sun Oct 19, 2008 5:01 am    Post subject: Reply with quote

Thanks sempsteen, nice howto.

I like to also set the font so my .gtkrc-2.0 looks like this
Code:
$ cat .gtkrc-2.0
include "/usr/share/themes/Qt/gtk-2.0/gtkrc"

style "user-font"
{
    font_name="Dejavu Sans 10"
}
widget_class "*" style "user-font"

gtk-theme-name="Qt"
gtk-font-name="Dejavu Sans 10"
Back to top
View user's profile Send private message
bblount
Tux's lil' helper
Tux's lil' helper


Joined: 08 Nov 2004
Posts: 80

PostPosted: Tue Oct 21, 2008 3:30 am    Post subject: Reply with quote

Could you post some screenshots?
Back to top
View user's profile Send private message
sempsteen
n00b
n00b


Joined: 18 Jul 2006
Posts: 13

PostPosted: Tue Oct 21, 2008 9:37 pm    Post subject: Reply with quote

Quote:
Could you post some screenshots?


Sorry for the late reply. Here are the screenshots:
Back to top
View user's profile Send private message
sempsteen
n00b
n00b


Joined: 18 Jul 2006
Posts: 13

PostPosted: Tue Oct 21, 2008 9:46 pm    Post subject: Reply with quote

notHerbert wrote:
Thanks sempsteen, nice howto.

I like to also set the font so my .gtkrc-2.0 looks like this
Code:
$ cat .gtkrc-2.0
include "/usr/share/themes/Qt/gtk-2.0/gtkrc"

style "user-font"
{
    font_name="Dejavu Sans 10"
}
widget_class "*" style "user-font"

gtk-theme-name="Qt"
gtk-font-name="Dejavu Sans 10"


Thanks for the info notHerbert.
Back to top
View user's profile Send private message
notHerbert
Advocate
Advocate


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Tue Oct 21, 2008 11:21 pm    Post subject: Reply with quote

Sure, no problem. :P

Here is another screenshot that shows the Gtk-2.0-Qt theme.
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2672
Location: here, there or in transit

PostPosted: Wed Oct 22, 2008 4:55 am    Post subject: Reply with quote

notHerbert wrote:
Here is another screenshot ....
Nice cow. :)
Looks related to Larry.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
bblount
Tux's lil' helper
Tux's lil' helper


Joined: 08 Nov 2004
Posts: 80

PostPosted: Wed Oct 22, 2008 7:37 am    Post subject: Reply with quote

Thanks for the screenshots, great tip.
Back to top
View user's profile Send private message
notHerbert
Advocate
Advocate


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Thu Oct 23, 2008 1:12 am    Post subject: Reply with quote

In fact if you emerge gtk-engines-qt, any of the Gtk themes can be set via GUI in the menu of KDE and Gnome. :P
Back to top
View user's profile Send private message
Sotol
Apprentice
Apprentice


Joined: 09 Apr 2004
Posts: 192

PostPosted: Thu Oct 23, 2008 6:55 am    Post subject: Reply with quote

Did you grab gtk-engines-qt from an overlay? The one in portage only seems to support kde 3.5.
Back to top
View user's profile Send private message
shickapooka800
Guru
Guru


Joined: 05 Dec 2004
Posts: 304
Location: no

PostPosted: Thu Oct 23, 2008 7:14 am    Post subject: Reply with quote

this strikes me as a bit opinionized. here is a meta-tip for looking good with gtk:

emerge --search engines

pick some random ones and emerge them.

emerge gtk-chtheme

run gtk-chtheme

flip through the gtk themes until you are blue in the face.
Back to top
View user's profile Send private message
notHerbert
Advocate
Advocate


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Thu Oct 23, 2008 3:00 pm    Post subject: Reply with quote

Sotol wrote:
Did you grab gtk-engines-qt from an overlay? The one in portage only seems to support kde 3.5.

I'm referring to x11-themes/gtk-engines-qt from portage, which may well not function in KDE-4. I don't know. I'm waiting for KDE-4.2.2-r2. :P




shickapooka800 wrote:
this strikes me as a bit opinionized. here is a meta-tip for looking good with gtk:


Well of course, choice of themes, wm, etc... can't be anything more than personal taste. :D

I think sempsteen's point was just to throw some ideas out there, good for me. :D

Thanks for your meta-tip, I'm going to try it right now. :P



Hmmmm
Code:
$ gtk-chtheme

(gtk-chtheme:10525): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Segmentation fault
:cry:
Back to top
View user's profile Send private message
shickapooka800
Guru
Guru


Joined: 05 Dec 2004
Posts: 304
Location: no

PostPosted: Thu Oct 23, 2008 4:12 pm    Post subject: Reply with quote

what gtk-chtheme are you running and what arch?
Back to top
View user's profile Send private message
notHerbert
Advocate
Advocate


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Thu Oct 23, 2008 5:52 pm    Post subject: Reply with quote

This is ARCH=x86 x11-themes/gtk-chtheme-0.3.1-r1

I do get the GUI but it segfaults when I click on a theme.

I was thinking just the other day that it would be nice to have a Gtk theme changer, but I was unaware of gtk-chtheme. I tried re-emerging gtk-engines. :cry:
Back to top
View user's profile Send private message
shickapooka800
Guru
Guru


Joined: 05 Dec 2004
Posts: 304
Location: no

PostPosted: Fri Oct 24, 2008 3:18 pm    Post subject: Reply with quote

notHerbert wrote:
This is ARCH=x86 x11-themes/gtk-chtheme-0.3.1-r1

I do get the GUI but it segfaults when I click on a theme.

I was thinking just the other day that it would be nice to have a Gtk theme changer, but I was unaware of gtk-chtheme. I tried re-emerging gtk-engines. :cry:


hmmm I have the same version, but am using amd64 arch. there is a gtk-chthtme-0.3.1.ebuild in the tree, maybe try that one? it is small, maybe you could compile it by hand (maybe with some debug options) and send a backtrace of the crash to the developer (or gentoo bugzilla).

edit: I assure you, this is THE gtk theme changer that people use all the time, so it should work just fine. maybe re-merge the apps in the DEPEND and RDEPEND list in the gtk-chthtme ebuild (looks like >=gtk+-2 and pkgconfig...... and its not pkgconfig's fault...)....
what are your USE flags that GTK+ cares about?

another idea: compile gtk+ with debug USE flag, then run gtk-chthtme in gdb and run a backtrace when it crashes. gtk-chthtme itself doesn't seem to be affected by the debug USE flag, so either adjust the ebuild and digest it, or compile gtk-chtheme by hand with ./configure --enable-debug. when it crashes in gdb, run `bt full' and either read through the output yourself, or post a bug with it.
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3753
Location: sleeping in the bathtub

PostPosted: Fri Oct 24, 2008 4:51 pm    Post subject: Reply with quote

shickapooka800 wrote:
this strikes me as a bit opinionized.
++

It's kinda suggesting that the only way gtk+ can look good is by emulating kde/qt, which is just inviting yet another flamewar on that issue...

I prefer gtk-chtheme too, but you can try lxappearance instead, which is actively developed (gtk-chtheme hasn't seen any updates in over 4 years...), doesn't have any gnome dependencies either and also lets you browse and set your gtk icon theme(s).
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
notHerbert
Advocate
Advocate


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Thu Nov 20, 2008 7:47 pm    Post subject: Reply with quote

timeBandit wrote:
notHerbert wrote:
Here is another screenshot ....
Nice cow. :)
Looks related to Larry.


Yep, I wonder who drewed em.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
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