Skip to content

add support for titlebar accessory views #175

@typemytype

Description

@typemytype

example:

import vanilla
import AppKit

def callback(sender):
    print("hit")

button = vanilla.Button((0, 0, 100, 22), "A Button!", callback=callback, sizeStyle="small")
button.getNSButton().setFrame_(((0, 0), (150, 22)))


w = vanilla.Window((400, 400))

titlebarController = AppKit.NSTitlebarAccessoryViewController.alloc().init()
titlebarController.setView_(button.getNSButton())
titlebarController.setLayoutAttribute_(AppKit.NSLayoutAttributeRight)

w.getNSWindow().addTitlebarAccessoryViewController_(titlebarController)

w.open()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions