當前位置: 首頁>>代碼示例>>Python>>正文


Python pango.STYLE_ITALIC屬性代碼示例

本文整理匯總了Python中pango.STYLE_ITALIC屬性的典型用法代碼示例。如果您正苦於以下問題:Python pango.STYLE_ITALIC屬性的具體用法?Python pango.STYLE_ITALIC怎麽用?Python pango.STYLE_ITALIC使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在pango的用法示例。


在下文中一共展示了pango.STYLE_ITALIC屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: set_slant

# 需要導入模塊: import pango [as 別名]
# 或者: from pango import STYLE_ITALIC [as 別名]
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") 
開發者ID:OpenXenManager,項目名稱:openxenmanager,代碼行數:15,代碼來源:label.py

示例2: _assign_placeholder_text

# 需要導入模塊: import pango [as 別名]
# 或者: from pango import STYLE_ITALIC [as 別名]
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) 
開發者ID:khalim19,項目名稱:gimp-plugin-export-layers,代碼行數:12,代碼來源:entries.py

示例3: _font_setup

# 需要導入模塊: import pango [as 別名]
# 或者: from pango import STYLE_ITALIC [as 別名]
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 
開發者ID:mailpile,項目名稱:gui-o-matic,代碼行數:10,代碼來源:gtkbase.py

示例4: new

# 需要導入模塊: import pango [as 別名]
# 或者: from pango import STYLE_ITALIC [as 別名]
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 { 
開發者ID:mjun,項目名稱:gnome-connection-manager,代碼行數:49,代碼來源:gnome_connection_manager.py


注:本文中的pango.STYLE_ITALIC屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。