当前位置: 首页>>代码示例>>Python>>正文


Python NSColor.clearColor方法代码示例

本文整理汇总了Python中AppKit.NSColor.clearColor方法的典型用法代码示例。如果您正苦于以下问题:Python NSColor.clearColor方法的具体用法?Python NSColor.clearColor怎么用?Python NSColor.clearColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AppKit.NSColor的用法示例。


在下文中一共展示了NSColor.clearColor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: openSplash

# 需要导入模块: from AppKit import NSColor [as 别名]
# 或者: from AppKit.NSColor import clearColor [as 别名]
def openSplash():
    global splash
    splash = NSWindow.alloc()
    rect = NSMakeRect(0,0,240,420)
    styleMask = 0
    splash.initWithContentRect_styleMask_backing_defer_(rect, styleMask, NSBackingStoreBuffered, False)

    # http://stackoverflow.com/questions/19437580/splash-screen-in-osx-cocoa-app

    splashImage = NSImageView.alloc().initWithFrame_(rect)
    splashImage.setImageScaling_(NSScaleToFit)
    splashImage.setImage_(NSImage.imageNamed_('ottosplash.png'))
    #[customView addSubview:splashImage];

    #splash.setContentView_(webview)
    splash.setContentView_(splashImage)
    splash.setHasShadow_(True)
    splash.setOpaque_(False)
    splash.setBackgroundColor_(NSColor.clearColor())

    # xPos = NSWidth([[splashWindow screen] frame])/2 - NSWidth([splashWindow frame])/2;
    #CGFloat yPos = NSHeight([[splashWindow screen] frame])/2 - NSHeight([splashWindow frame])/2;
    #[splashWindow setFrame:NSMakeRect(xPos, yPos, NSWidth([splashWindow frame]), NSHeight([splashWindow frame])) display:YES];
    splash.center()
    splash.orderFrontRegardless()
开发者ID:ferguson,项目名称:otto,代码行数:27,代码来源:Simple.py

示例2: __init__

# 需要导入模块: from AppKit import NSColor [as 别名]
# 或者: from AppKit.NSColor import clearColor [as 别名]
 def __init__(self, posSize, url, editable=False, callback=None, sizeStyle="regular"):
     self._setupView(self.nsPathControlClass, posSize, callback=callback)
     self._nsObject.setPathStyle_(self.nspathStyle)
     self._setSizeStyle(sizeStyle)
     self._nsObject.setURL_(url)
     self._nsObject.setBackgroundColor_(NSColor.clearColor())
     self._nsObject.setFocusRingType_(NSFocusRingTypeNone)
开发者ID:schriftgestalt,项目名称:vanilla,代码行数:9,代码来源:vanillaPathControl.py

示例3: __init__

# 需要导入模块: from AppKit import NSColor [as 别名]
# 或者: from AppKit.NSColor import clearColor [as 别名]
 def __init__(self, posSize, url, callback=None, pathStyle="standard", sizeStyle="regular"):
     self._setupView(self.nsPathControlClass, posSize, callback=callback)
     self._nsObject.setPathStyle_(_pathStylesMap[pathStyle])
     self._setSizeStyle(sizeStyle)
     self._nsObject.setBackgroundColor_(NSColor.clearColor())
     self._nsObject.setFocusRingType_(NSFocusRingTypeNone)
     self._nsObject.cell().setBordered_(True)
     self._nsObject.cell().setBezelStyle_(NSRoundedBezelStyle)
     self.set(url)
开发者ID:LettError,项目名称:vanilla,代码行数:11,代码来源:vanillaPathControl.py

示例4: __init__

# 需要导入模块: from AppKit import NSColor [as 别名]
# 或者: from AppKit.NSColor import clearColor [as 别名]
 def __init__(self, posSize, screen=None):
     super(InformationPopUpWindow, self).__init__(posSize, "", minSize=None,
             maxSize=None, textured=False, autosaveName=None,
             closable=False, initiallyVisible=False, screen=screen)
     contentView = DefconAppKitInformationPopUpWindowContentView.alloc().init()
     self._window.setContentView_(contentView)
     self._window.setBackgroundColor_(NSColor.clearColor())
     self._window.setAlphaValue_(0.0)
     self._window.setOpaque_(False)
     self._window.setHasShadow_(True)
     self._window.setMovableByWindowBackground_(False)
开发者ID:typesupply,项目名称:defconAppKit,代码行数:13,代码来源:popUpWindow.py


注:本文中的AppKit.NSColor.clearColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。