MacGapProject / MacGap1

Desktop WebKit wrapper for HTML/CSS/JS applications.
Other
3.55k stars 208 forks source link

Toolbar support for the window #33

Closed mechiland closed 10 years ago

mechiland commented 12 years ago

The Mac Toolbar window is normally used as Preferences. Currently there is only one window which basically embed an WebView. Would be good introduce another window type with toolbar supported.

The toolbar can be a special HTML element (

), or a separate WebView which basically can render any valid HTML.

Well, I don't know its doable or not, nor the API design.

liamks commented 12 years ago

Why not use the normal webview for preferences? Most web apps have dedicated views, or modal dialogues, for preferences, why not do the same with your macgap app? What type of preferences are you referring to?

mechiland commented 12 years ago

It's all about the look and feel. Just like all the work like JQuery mobile - it tried very hard to make the web application look like native iOS/Andorid app, MacGap should do the similar thing. FYI, the twitter preference window. Look at the toolbar on top. http://d.pr/xm25

Update: well I agree this isn't critical - user can always find creative way to do it.

jeff-h commented 10 years ago

It's an interesting discussion. This part of the Mac UI is not easy to replicate accurately in HTML/JS.

You actually can create a second window in Xcode for your prefs, putting an NSToolbar on it and various controls, and bind them all to NSUserDefaults, all without writing Objective-C. Now (as of a week or so ago) MacGap JavaScript gets notified of changes to NSUserDefaults.