本文整理汇总了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()
示例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)
示例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)
示例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)