no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionNext revision | |||
— | customization:themes [2010/01/26 01:14] – squentin | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | A few notes to explain how to theme gmusicbrowser using customs gtk themes. \\ | ||
+ | Feel free to improve this page. | ||
+ | |||
+ | First you need to have some knowledge about how gtk themes works, [[http:// | ||
+ | |||
+ | To launch gmusicbrowser with a custom gtkrc file, you can type this : | ||
+ | < | ||
+ | replace gtkrc by the full or relative path and filename. | ||
+ | |||
+ | To help finding the path of widgets you want to theme, I've added some functions to my Debug.pm plugin, you can find it [[/ | ||
+ | Note that some things will not work with version older than 1.0.2 (widget names and the WB container). | ||
+ | |||
+ | |||
+ | Example of what you can put in a gtkrc file : | ||
+ | < | ||
+ | style " | ||
+ | { bg[NORMAL] | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
+ | |||
+ | widget_class " | ||
+ | </ | ||
+ | This define the style " | ||
+ | |||
+ | The theme is applied to all widgets which class_path match " | ||
+ | The class_path is a string made of the class name of all widget and all of its parents, joined by a period " | ||
+ | |||
+ | For example, the " | ||
+ | So to apply the style " | ||
+ | < | ||
+ | widget_class " | ||
+ | </ | ||
+ | |||
+ | But, this has a few problems : | ||
+ | - the class path is very generic and is likely to match another widget. So I've made gmusicbrowser give names to some of the gtk widgets. The windows have the name of the layout id, and the toplevel gtk widgets of gmb widgets get the name of the gmb widget. So for example, with the " | ||
+ | - the " | ||
+ | - the composition of gmb widgets could change in the future, that, sadly, will always be a possibility, | ||
+ | |||
+ | So by modifying the Browser layout like this : | ||
+ | - replace Total by WBTotal | ||
+ | - WBTotal = Total | ||
+ | the path of " | ||
+ | And with a gtkrc of : | ||
+ | < | ||
+ | style " | ||
+ | { bg[NORMAL] | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
+ | |||
+ | widget " | ||
+ | </ | ||
+ | Note that this time it uses " | ||
+ | The style " | ||
+ | |||