Python pango.STYLE_ITALIC Examples

The following are 4 code examples of pango.STYLE_ITALIC(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module pango , or try the search function .
Example #1
Source File: label.py    From openxenmanager with GNU General Public License v2.0 5 votes vote down vote up
def set_slant(self, slant):
        """
        Set the font slant. slat has to be one of the following:
        
         - label.STYLE_NORMAL
         - label.STYLE_OBLIQUE
         - label.STYLE_ITALIC
         
        @param slant: the font slant style
        @type slant: one of the constants above.
        """
        self.set_property("slant", slant)
        self.emit("appearance_changed") 
Example #2
Source File: entries.py    From gimp-plugin-export-layers with GNU General Public License v3.0 5 votes vote down vote up
def _assign_placeholder_text(self):
    if self._placeholder_text is not None:
      self._has_placeholder_text_assigned = True
      
      # Delay font modification until after widget realization as the font may
      # have been different before the realization.
      if self.get_realized():
        self._modify_font_for_placeholder_text(gtk.STATE_INSENSITIVE, pango.STYLE_ITALIC)
      
      self._do_assign_text(self._placeholder_text) 
Example #3
Source File: gtkbase.py    From gui-o-matic with GNU Lesser General Public License v3.0 5 votes vote down vote up
def _font_setup(self):
        for name, style in self.config.get('font_styles', {}).iteritems():
            pfd = pango.FontDescription()
            pfd.set_family(style.get('family', 'normal'))
            pfd.set_size(style.get('points', 12) * pango.SCALE)
            if style.get('italic'): pfd.set_style(pango.STYLE_ITALIC)
            if style.get('bold'): pfd.set_weight(pango.WEIGHT_BOLD)
            self.font_styles[name] = pfd 
Example #4
Source File: gnome_connection_manager.py    From gnome-connection-manager with GNU General Public License v3.0 4 votes vote down vote up
def new(self):
        global groups
        
        self.cmbGroup = self.get_widget("cmbGroup")
        self.txtName = self.get_widget("txtName")
        self.txtDescription = self.get_widget("txtDescription")
        self.txtHost = self.get_widget("txtHost")
        self.cmbType = self.get_widget("cmbType")
        self.txtUser = self.get_widget("txtUser")
        self.txtPass = self.get_widget("txtPassword")
        self.txtPrivateKey = self.get_widget("txtPrivateKey")
        self.btnBrowse = self.get_widget("btnBrowse")
        self.txtPort = self.get_widget("txtPort")
        self.cmbGroup.get_model().clear()
        for group in groups:
            self.cmbGroup.get_model().append([group])
        self.isNew = True
        
        self.chkDynamic = self.get_widget("chkDynamic")
        self.txtLocalPort = self.get_widget("txtLocalPort")
        self.txtRemoteHost = self.get_widget("txtRemoteHost")
        self.txtRemotePort = self.get_widget("txtRemotePort")
        self.treeTunel = self.get_widget("treeTunel")
        self.txtComamnds = self.get_widget("txtCommands")
        self.chkComamnds = self.get_widget("chkCommands")
        buf = self.txtComamnds.get_buffer()
        buf.create_tag('DELAY1', style=pango.STYLE_ITALIC, foreground='darkgray')
        buf.create_tag('DELAY2', style=pango.STYLE_ITALIC, foreground='cadetblue')
        buf.connect("changed", self.update_texttags)
        self.chkKeepAlive = self.get_widget("chkKeepAlive")
        self.txtKeepAlive = self.get_widget("txtKeepAlive")
        self.btnFColor = self.get_widget("btnFColor")
        self.btnBColor = self.get_widget("btnBColor")
        self.chkX11 = self.get_widget("chkX11")
        self.chkAgent = self.get_widget("chkAgent")
        self.chkCompression = self.get_widget("chkCompression")
        self.txtCompressionLevel = self.get_widget("txtCompressionLevel")
        self.txtExtraParams = self.get_widget("txtExtraParams")
        self.chkLogging = self.get_widget("chkLogging")
        self.cmbBackspace = self.get_widget("cmbBackspace")
        self.cmbDelete = self.get_widget("cmbDelete")
        self.cmbType.set_active(0)
        self.cmbBackspace.set_active(0)
        self.cmbDelete.set_active(0)
    #-- Whost.new }

    #-- Whost custom methods {