예제 #1
0
 def on_status_font_button_clicked(self, w):
     pango_font = select_font(
                               self.window,
                               self.properties.status.font,
                               'Status font'
                             )
     if pango_font:
         self.properties.status.font = pango_font.to_string()
         self.__build_tooltip_status_font()
예제 #2
0
    def on_styles_font_button_clicked(self, w):
        curr_style = self.properties.styles.item( self.current_style )
        f_desc = self.__style_build_font_description( curr_style )

        pango_font = select_font( self.window, f_desc, 'Style font' )

        if pango_font:
            curr_style.font_family = str( pango_font.get_family() )
            curr_style.font_size = int( pango_font.get_size()/pango.SCALE )
            curr_style.bold = \
                 bool( pango_font.get_weight() > pango.WEIGHT_NORMAL )
            curr_style.italic = \
                 bool( pango_font.get_style() == pango.STYLE_ITALIC )

            self.wTree.get_widget('styles_font_description_label').set_text(
                 pango_font.to_string()   )