QTPixmap GTK engine and Geramik GTK theme

Craig Drummond (Craig.Drummond@lycos.co.uk)

==================================================================================

About
-----

This is a engine/theme intended to make GTK applications have a similar look
to the Keramik KDE style (which will be the default from KDE3.1).



Installation
------------

./configure --prefix=/where/you/want/to/install/this

then copy
    /where/you/want/to/install/this/share/themes/Geramik/gtk/gtkrc
...to either /etc/gtk/gtkrc or ~/.gtkrc

For GTK2 apps, copy
    /where/you/want/to/install/this/share/themes/Geramik/gtk-2.0/gtkrc
...to either /etc/gtk-2.0/gtkrc or ~/.gtkrc-2.0

*OR*
Another, simpler way is to edit ~/.gtkrc (GTK1) or ~/.gtkrc-2.0 (GTK2) and
just have the following line:

    include "/where/you/want/to/install/this/share/themes/Geramik/gtk/gtkrc"
-or-
    include "/where/you/want/to/install/this/share/themes/Geramik/gtk-2.0/gtkrc"



Font Sizes
----------

Using Mandrake 9.0 I came accross a curious situation where a 12pt font was a
different size in a KDE app (which uses Xft to draw fonts), and a GTK1 app (which
uses plain X to draw fonts). I finally tracked this down to the fact that Mandrake
was hard-coding a 90dpi resolution for Xft - wherease standard X defaults to 75dpi.
To remedy this I had to remove the following line:

    Xft.dpi: 90

...from both /etc/X11/Xresources /etc/X11/xdm/Xresources

Then when the X server was restarted, both Xft and X apps then used the *same*
resolution - resulting in consistency between GTK1, GTK2, and KDE/Qt applications.
(NOTE: You maky need to change the used font siszes in KControl/fonts)

If you want to use a higher than 75 dpi resolution, I suggest you edit /etc/X11/xdm/Xservers
and set it to someting like (for 100dpi)

:0 local /bin/nice -n -10 /usr/X11R6/bin/X -deferglyphs 16 -dpi 100


...this way *both* Xft and X apps will then use the new resolution!



Engine
------

The engine, qtpixmap, is a hacked/modified version of the standard GTK
pixmap engine. This has been changed to allow the recolouring of pixmaps
based upon the colours defined in ~/.qt/qtrc (hence the qt part of the
name). This allows the theme's colours to more closely match KDE's, and
to change when KDE changes. (NOTE: GTK apps, unlike the KDE ones, will
have to be restarted for colour changes to take effect.)

To accomodate these changes, the gtkrc files now suppport some extra keywords:


    file_color               Specifies the color - "button", "window",
                             "selected", or "background" - to use for the
                             pixmap. Using "button" will cause the pixmaps
                             colour to be that of KDE's button colour.
    file_color_mod           Is an integer specifying the amount to brighten
                             the image by.

    overlay_file_color 
    overlay_file_color_mod

    ...etc

NOTE: I've *never* done any GTK programming before, so it's likely that some
mistakes will have been made.


FONTS: For GTK1 apps, if you are having problems with font encodings, set the
       QT_GTK_ENC to your required encoding. e.g.
           export QT_GTK_ENC=iso8859-2



Theme
-----

The theme is taken, and modified, from the alpha release of Keramik_GTK
by Goamaus (goamaus@web.de).

Numerous changes have been made - almost all of the pixmaps have been
re-created, and extra features have been added.
