-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve modal and add more customising options #126
Comments
Tada! 🎉 var parent = Screen.main().visibleFrameInRectangle();
var modal = new Modal();
modal.weight = 100;
modal.appearance = 'transparent';
modal.text = '🐱';
modal.origin = {
x: parent.x + (parent.width / 2) - (modal.frame().width / 2),
y: parent.y + (parent.height / 2) - (modal.frame().height / 2)
};
modal.show(); |
Epic! Don't know what I'm gonna do with it yet, but I look forward to playing around with it 😆! |
@mafredri How about a nice little cat vs. mouse mini-game? 😆 I’m also looking into adding the support to display an app icon alongside the message. (These were just some additional benefits for that.) |
Haha, would be a fun proof of concept xD!
Oh yes, that will be very nice, especially when showing modals on a per-window basis! |
If someone finds any bugs, please report! This feature should be mostly done now. Just some cleaning up to do. |
Looking really nice, great work! I'll try to find some time this week to play around with them :). |
Lastly, a nice factory method! var parent = Screen.main().visibleFrameInRectangle();
var modal = Modal.build({
appearance: 'light',
icon: App.get('Spotify').icon(),
text: 'Spotify',
origin: function (frame) {
return {
x: parent.x + (parent.width / 2) - (frame.width / 2),
y: parent.y + (parent.height / 2) - (frame.height / 2)
};
}
});
modal.show(); |
Improve modal and add more customising options.
NSVisualEffectView
as content viewdark|light|transparent
)message
-property for removal in next minor releasetext
-property, aliasmessage
-property totext
Modal.build(properties)
The text was updated successfully, but these errors were encountered: