Changes

Jump to: navigation, search

Overrule Gramps Icons

221 bytes added, 00:43, 13 January 2019
mark page as outdated - believe came up in recent conversation on mailing list.
{{man warn|Instructions are for Gramps version 2.4}}{{stub}}Making custom icons for use in GRAMPSGramps
[[Category:Documentation]][[Category:Developers/Artwork]]==Why do this==The Gramps icon style is based on the Tango guidelines. If you use a different icon set, this might not fit in well. Normally the GTK stock icons should be taken from the theme you use, so paste, edit, add, ... should be conform. You can overrule those too however.
==Why do thisOverruling Gramps icons, with fallback==The GRAMPS icon style is based on the Tango guidelinesIn Gramps version 2.4. If Suppose you use a different the ''Buuf'' icon settheme, this might not fit in welland want to make your own custom gramps icons. Normally the GTK stock icons should be taken from Then do the theme you use, so paste, edit, add, ... should be conform. You can overrule those too however. following:
==Overruling GRAMPS icons, with fallback==
The following is for upcoming version 2.4. Suppose you use the ''Buuf'' icon theme, and want to make your own custom gramps icons. Then do the following:
===Preparation===
*In directories <code>Buuf/16x16</code>, <code>Buuf/22x22</code>, <code>and Buuf/scalable</code>, add the directory <code>gramps</code>.
*In these created gramps directories, make the icons with the corresponding sizes (scalable is for svg icons of size 48x48px), for the gramps Gramps icons you want to overrule. Give the icons the correct gramps name, see [[GRAMPS Gramps icon set]]. 
===Overruling===
To make GRAMPS Gramps use these icons, save a backup of gramps_main.py and then open gramps_main.py. Change the following codelines, using the '''correct''' path names on your system:
iconpaths = [
(os.path.join(const.image_dir,'scalable'),'.svg'),
]
Your own icons are now visible in grampsGramps. You could off course replace the gramps Gramps icons in the images directory too, but the above method has less risk of deleting icons by error.
==Overrule GTK icons==
To overrule GTK icons, your theme must be correctly configured. The theme will normally map a set of gtk icons to theme icons. In eg the Tango icon set, a actions/gtk-copy.png icon is available. By replacing it you see it everywhere different.
In KDE, if you use the GTK-QT-engine to make GTK apps look like QT apps, you will note that this does not work 100%. '''Patches have been accepted in GTK-QT to make it work, version > 0.7'''. <br \>If you have version <= 0.7 you can hack the .gtk_qt_engine_rc file in your home directrydirectory to make it work. The variable ''pixmap_path'' sets the absolute path where icons can be found, and eg
<nowiki>stock["gtk-bold"]={
{ "22x22/actions/text_bold.png", *, *, "gtk-large-toolbar" },
{ "22x22/actions/text_bold.png" }
}</nowiki>
shows how to find the gtk icon gtk-bold, and with which sizes. This can be easily changed to your liking. If you make an error, delete the file and restart GRAMPSGramps. The gtk-qt-engine will recreate it (on font/icon set change the file is also regenerated, so '''keep a backup of your changes''' to the file). == See also ==*[[Using icons]] [[Category:Developers/Artwork]]

Navigation menu