当前位置: 首页>>代码示例>>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;未经允许,请勿转载。