Skip to content

add support for titlebar accessory views #175

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()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions