Skip to content
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

Toolbar Mac XCode-style #390

Closed
TomQv opened this issue Sep 28, 2015 · 6 comments
Closed

Toolbar Mac XCode-style #390

TomQv opened this issue Sep 28, 2015 · 6 comments
Milestone

Comments

@TomQv
Copy link

TomQv commented Sep 28, 2015

Hi Curtis, I'm wondering, if it might be possible to have a toolbar in Mac similar to how it looks in XCode.
Currently we can only have one toolbar in the main-window, but for some use-cases it would be useful to have these nice and slim toolbars like XCode has it even in sub-views in addition to the main-toolbar.
Tom

@cwensley
Copy link
Member

You can do this currently with a style in your startup mac app, before running your application:

// In Xamarin.Mac:
Eto.Style.Add<Eto.Mac.Forms.FormHandler>("unified", h => h.Control.TitleVisibility = NSWindowTitleVisibility.Hidden);

// For MonoMac, since the TitleVisibility api hasn't been bound yet: 
Eto.Style.Add<Eto.Mac.Forms.FormHandler>("unified", h => {
    MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_IntPtr(h.Control.Handle, MonoMac.ObjCRuntime.Selector.GetHandle("setTitleVisibility:"), (IntPtr)1);
});

then just set myWindow.Style = "unified" to any form you want to have a unified toolbar.

@TomQv
Copy link
Author

TomQv commented Sep 28, 2015

ok, this looks much better. Seems like this Style-feature is very powerful.

btw. is there a way to add other controls to the toolbar, like e.g. a SearchBox?
Can I group some toolbar-buttons so that they are rendered without a gap in between?

Tom

@cwensley
Copy link
Member

Hey Tom,

There's no way to put a search box on the toolbar just yet. This should be doable with a new CustomToolItem that I'd like to implement (issue #32). It's been outstanding for a while - I should really get to that. The more I hear of it bumps it up in priority though so I'll see if I can get to that soon (if no one else does).

As for grouping buttons on a toolbar, that will require a new control unless you want to implement your own custom platform control. However, this will probably appear on my priority list fairly soon as I'll be needing this type of control as well.

@cwensley cwensley modified the milestone: 2.x Nov 6, 2015
@harry-cpp
Copy link
Contributor

Gtk 3 has something similar called HeaderBar:
HeaderBar

@TomQv
Copy link
Author

TomQv commented Aug 3, 2017

any news on this?
grouping buttons?
put a search box on the toolbar ?

@cwensley
Copy link
Member

This issue itself appears to be resolved using the style supplied.

Grouping buttons is reported with #889
Search box on toolbar is reported with #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants