Skip to content

CPUI 0.1.3

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Dec 07:56
· 32 commits to dev since this release
46909fb

System notifications, bringing windows forward with badges and attention requests, rich text paragraphs, scroll areas that stay at their end, integrated title bars on macOS, custom areas that take focus and text, macOS text at the width the system draws it, and keys and assistive technology requests handled in the order they arrive.

Added

  • The new cpui-notify crate shows system notifications on macOS, iOS, Windows and Linux, replaces or removes them by key, and reports which one the user clicked. (#78)
  • Ui::focus_window brings a window to the front, Ui::request_attention asks for the user's attention with a bouncing Dock icon or a flashing taskbar button, and Ui::set_badge shows a count on the application's icon. (#77)
  • Ui::rich_text lays out one paragraph of bold, italic, inline code, colored text, links and tags that wraps, selects and copies as one text, with links and tags reachable by keyboard and screen readers and reporting the key they were given when clicked. (#76)
  • .stick_to_end() keeps a scroll area or list at its end while it is there, so new lines stay in view as in a chat or a log, and Ui::is_scrolled_to_end and Ui::scroll_to_end read and set that. (#75)
  • Options::integrated_title_bar extends the content of a macOS window into its title bar, Ui::title_bar_insets keeps controls clear of the window buttons, and drag_window on a container moves the window by its empty space. (#71)
  • Ui::custom_area declares an area drawn in App::paint that can take keyboard focus, keys and input method text, and Ui::set_ime_caret opens the candidate window at its caret. (#70)
  • Ui::font_system measures text and places carets during layout with the fonts the window draws with, Ui::scale_factor gives the display scale before drawing, and cpui exports FontSystem, TextDirection and TextCluster. (#67)
  • clicks() on a widget or its Response returns how many clicks in a row this frame's click completes, so custom widgets can tell single, double and triple clicks apart. (#66)
  • Ui::animate_with gives a transition its own duration and curve, set with Motion and Easing, including cubic Bézier curves. (#57)
  • Ui::clipboard_text reads text from the clipboard. (#56)
  • Options::max_size limits how large the user can make a window, and Options::always_on_top with Ui::set_always_on_top keeps a window above others. (#55)
  • Ui::scroll_to_row scrolls a list to a row, even one far from the view, and Ui::scroll_into_view scrolls a widget into view without focusing it. (#54)
  • Input::push_key adds an editing key after the text typed so far, so frames driven by hand keep the order of keys and text. (#53)

Changed

  • Setting the same window title again, as a frame may, no longer allocates or sets it on the window again. (#77)
  • Comboboxes search large option lists faster for queries containing Han characters. (#60)
  • Opening large combobox lists is faster when the search field is empty. (#59)
  • Searching large combobox lists is faster when labels start with ASCII text. (#58)
  • Closed, unfocused comboboxes take less time to redraw. (#50)

Deprecated

  • Ui::custom and CustomOptions are deprecated in favor of Ui::custom_area, whose opaque and revision take the same settings, and will be removed in 0.2.0 at the earliest. (#84)

Fixed

  • Text in variable fonts with an optical-size axis, such as the macOS system font, now uses the design the font has for its size, so small text is no longer about 10% narrower than in other apps. (#83)
  • A disabled widget whose only accessible description comes from its aria_* settings is reported to assistive technology as disabled. (#70)
  • Several requests from assistive technology before the same frame each apply to their own control, in the order they arrived, instead of one replacing another or stepping the wrong slider. (#61)
  • Keys and text that arrive before the same frame take effect in the order they were typed, so Backspace no longer removes a later character, text typed after Tab goes to the next field, and text typed after Enter follows what Enter did. (#53)
  • Pressing an arrow key right after Home or End on tabs no longer lands on the wrong tab. (#52)