1 # -*- coding: utf-8 -*-
3 # gPodder - A media aggregator and podcast client
4 # Copyright (c) 2005-2010 Thomas Perl and the gPodder Team
6 # gPodder is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # gPodder is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
23 # See the Fremantle Master Layout Guide for more information:
24 # http://tinyurl.com/fremantle-master-layout-guide
26 # For implementation details, consult hildon/hildon-helper.c
27 # (the function is called hildon_change_style_recursive_from_list)
29 logical_font_names = (
32 'SmallSystemFont', # Used for secondary text in buttons/TreeViews
34 'LargeSystemFont', # Used for empty TreeView text
37 'XXX-LargeSystemFont',
41 logical_color_names = (
43 'ButtonTextPressedColor',
44 'ButtonTextDisabledColor',
45 'ActiveTextColor', # Used for Button values, etc..
46 'SecondaryTextColor', # Used for additional/secondary information
49 def get_font_desc(logicalfontname):
50 settings = gtk.settings_get_default()
51 font_style = gtk.rc_get_style_by_paths(settings, logicalfontname, \
53 font_desc = font_style.font_desc
56 def get_color(logicalcolorname):
57 settings = gtk.settings_get_default()
58 color_style = gtk.rc_get_style_by_paths(settings, 'GtkButton', \
59 'osso-logical-colors', gtk.Button)
60 return color_style.lookup_color(logicalcolorname)
63 # For debugging; usage: python -m gpodder.gtkui.frmntl.style
64 if __name__ == '__main__':
65 for font_name in logical_font_names:
66 print font_name, '-> ', get_font_desc(font_name).to_string()
68 for color_name in logical_color_names:
69 print color_name, '-> ', get_color(color_name).to_string()