jhbuild gtk3 with no theme

Dear lazyweb,

I swear I tried asking on IRC, but it seems everyone was away. That’s my question. I’m using gtk+3 and pygobject built using jhbuild. How to get the gtk3 theme working properly? It looks like this:

gtk3 theme ugly

Any tips?

Update: To explain it correctly: I’m running Debian testing and I have gtk+ an pygobject built from sources with jhbuild (just to learn pygtk/pygobject differences). I’ve already built gnome-themes-standard too, but it doesn’t work. The only progress I have was to get Cantarell fonts with the same “no-theme” gtk+.

 

Update 2 (solved): Many thanks to Benjamin Otte.

11 Responses to “jhbuild gtk3 with no theme”

  1. Build and install gnome-themes-standard within the jhbuild root. It’s in the defined module sets already.

  2. Andrew says:

    Do you have GNOME3 installed?

  3. Do you use introspection?

    from gi.repository import Gtk, GLib, GObject, GdkPixbuf, Gio, Pango

  4. jell says:

    gnome-tweak-tool, and set theme as adwaita
    or set this in gsettings from console

  5. Carlos Garnacho says:

    To get the Adwaita theme, jhbuild buildone gnome-themes-standard. Generally, GTK reads theme files from $PREFIX/share/themes/$THEME_NAME/gtk-3.0/gtk.css

  6. António says:

    I think you need gnome-themes-standard to get Adwaita.

    I have Gnome Shell built with jhbuild under Ubuntu 10.10 / 11.4. It built gnome-themes-standard, but Adwaita was installed under ~/gnome-shell/install/share/themes, so I copied it to /user/share/themes/ and got it working. This worked for me. Hope it helps.

  7. António says:

    Só agora reparei que não havia necessidade de ter respondido em inglês. Ainda por cima o meu inglês é fraquinho. :D

  8. Jesse van den Kieboom says:

    The most reliable way I found (maybe there is another way, I would be interested to know), is to write a very small gtk+ module that simply overrides the gtk setting for the theme (gtk-theme-name) using gtk_settings_set_string_property.

  9. Stiph says:

    gsettings reset org.gnome.desktop.interface gtk-theme

    or

    gsettings set org.gnome.desktop.interface gtk-theme ‘Adwaita’

    Off course you need the Adwaita gtk3 theme :)

  10. brunobol says:

    @ Andrew:
    I don’t have GNOME3, just gtk+ 3 and pygobject.

    @Álvaro:
    Yes, I’m using introspection.

  11. Benjamin Otte says:

    1) You need to set “Adwaita” as your GTK theme if you are running a gnome desktop.
    2) You need gnome-themes-standard installed in your jhbuild.
    3) You need librsvg installed in your jhbuild.

    With that, it should work. If not, it should at least print an error to stderr.

    PS: The default theme is awesome!