Skip to content

v0.2.3

Choose a tag to compare

@clearloop clearloop released this 28 Sep 14:00
a86df36

Segmented rows in menus, new-window requests from a WebView's page reported to its host, and a WebView on macOS that gives the keys back to gpui when anything outside it is pressed.

New

  • menu::Item::Segmented is a row of options side by side, each a glyph over its label, the selected one highlighted, built with Item::segmented from menu::Segments. A pick is a Hit::Choose whose path is the row's, then the segment's index. Cursor::slide moves between the live row's segments, stopping at either end, and Cursor::segment is the live one; a menubar's ← and → slide within a segmented row before they open, close or switch menus.
  • browser::WebView::release_keys takes the keys back from the page if it holds them, whatever gpui's focus is.
  • browser::WebViewEvent::NewWindow carries the URL a page asked to open in a window of its own, from a target="_blank" link or window.open. No window opens and the page stays where it is. The browse app opens it in a new tab.

Changed

  • browser::WebViewEvent has a NewWindow variant; a match over it needs an arm for it.
  • menu::Item has a Segmented variant; a match over it needs an arm for it. Cursor::path ends with the live segment's index while the live row is segmented.

Fixed

  • On macOS, a press in any frame of a WebView's page focuses the view, including frames whose press never reached it before.
  • On macOS, a WebView's page moved to another window gives the keys back to gpui in that window, and a press on gpui's view outside the page takes the keys back even when gpui's focus does not move.