Druid v0.6.0 Release Notes

Release Date: 2020-06-01 // over 2 years ago
  • Highlights

    X11 backend for druid-shell.

    ๐Ÿ‘ [@crsaracco] got us started and implemented basic support to run druid on bare-metal X11 in [#599]. โž• Additional features got fleshed out in [#894] and [#900] by [@xStrom] and in [#920], [#961], and [#982] by [@jneem].

    ๐Ÿง While still incomplete this lays the foundation for running druid on Linux without relying on GTK.

    ๐ŸŒ Web backend for druid-shell.

    ๐ŸŒ [@elrnv] continued the work of [@tedsta] and implemented a mostly complete web backend via WebAssembly (Wasm) in [#759] and enabled all druid examples to ๐Ÿ’ป run in the browser.

    ๐Ÿ”Š While some features like the clipboard, menus or file dialogs are not yet available, all fundamental features are there.

    ๐ŸŽ Using Core Graphics on macOS.

    ๐Ÿ‘ [@cmyr] continued the work of [@jrmuizel] and implemented Core Graphics support for Piet in piet#176.

    Those changes made it into druid via [#905]. ๐ŸŽ This means that druid no longer requires cairo on macOS and uses Core Graphics instead.

    โž• Added

    • Standardized and exposed more methods on more contexts. ([#970], [#972], [#855] by [@cmyr], [#898] by [@finnerale], [#954] by [@xStrom], [#917] by [@jneem])
    • ๐Ÿ“„ im feature, with Data support for the im crate collections. ([#924] by [@cmyr])
    • ๐Ÿ‘ im::Vector support for the List widget. ([#940] by [@xStrom])
    • TextBox can receive EditAction commands. ([#814] by [@cmyr])
    • Split::min_splitter_area(f64) to add padding around the splitter bar. ([#738] by [@xStrom])
    • Published druid::text module. ([#816] by [@cmyr])
    • ๐Ÿšฆ InternalEvent::MouseLeave signalling the cursor left the window. ([#821] by [@teddemunnik])
    • InternalEvent::RouteTimer to route timer events. ([#831] by [@sjoshid])
    • children_changed now always includes layout and paint request. ([#839] by [@xStrom])
    • request_paint_rect for partial invalidation. ([#817] by [@jneem])
    • Window title can be any LabelText (such as a simple String). ([#869] by [@cmyr])
    • Label::with_font and set_font. ([#785] by [@thecodewarrior])
    • ๐ŸŽ MouseEvent now has a focus field which is true with window focusing left clicks on macOS. ([#842] by [@xStrom])
    • ๐Ÿ‘€ MouseButtons to MouseEvent to track which buttons are being held down during an event. ([#843] by [@xStrom])
    • Env and Key gained methods for inspecting an Env at runtime ([#880] by [@Zarenor])
    • WinHandler::scale method to inform of scale changes. ([#904] by [@xStrom])
    • WidgetExt::debug_widget_id, for displaying widget ids on hover. ([#876] by [@cmyr])
    • LifeCycle::Size event to inform widgets that their size changed. ([#953] by [@xStrom])
    • FileDialogOptions methods default_name, name_label, title, button_text, packages_as_directories, force_starting_directory. ([#960] by [@xStrom])
    • Button::dynamic constructor. ([#963] by [@totsteps])
    • Spinner widget to represent loading states. ([#1003] by [@futurepaul])
    • ๐Ÿ”— Link to the widget_nursery in README ([#1754] by [@xarvic])

    ๐Ÿ”„ Changed

    • Renamed WidgetPod methods: paint to paint_raw, paint_with_offset to paint, paint_with_offset_always to paint_always. ([#980] by [@totsteps])
    • ๐Ÿšš Renamed Event::MouseMoved to MouseMove. ([#825] by [@teddemunnik])
    • ๐Ÿ“‡ Renamed Split constructors to Split::rows and columns. ([#738] by [@xStrom])
    • Replaced NEW_WINDOW, SET_MENU and SHOW_CONTEXT_MENU commands with methods on EventCtx and DelegateCtx. ([#931] by [@finnerale])
    • Replaced Command::one_shot and ::take_object with a SingleUse payload wrapper type. ([#959] by [@finnerale])
    • Command and Selector have been reworked and are now statically typed, similarly to Env and Key. ([#993] by [@finnerale])
    • AppDelegate::command now receives a Target instead of a &Target. ([#909] by [@xStrom])
    • SHOW_WINDOW and CLOSE_WINDOW commands now only use Target to determine the affected window. ([#928] by [@finnerale])
    • Global Application associated functions are instance methods instead, e.g. Application::global().quit() instead of the old Application::quit(). ([#763] by [@xStrom])
    • Event::Internal(InternalEvent) bundles all internal events. ([#833] by [@xStrom])
    • Timer events will only be delivered to the widgets that requested them. ([#831] by [@sjoshid])
    • Split::splitter_size no longer includes padding. ([#738] by [@xStrom])
    • has_focus no longer returns false positives. ([#819] by [@xStrom])
    • WidgetPod::set_layout_rect now requires LayoutCtx, data and Env. ([#841] by [@xStrom])
    • request_timer uses Duration instead of Instant. ([#847] by [@finnerale])
    • ๐Ÿ‘€ Event::Wheel now contains a MouseEvent structure. ([#895] by [@teddemunnik])
    • The WindowHandle::get_dpi method got replaced by WindowHandle::get_scale. ([#904] by [@xStrom])
    • The WinHandler::size method now gets a Size in display points. ([#904] by [@xStrom])
    • Standardized the type returned by the contexts' text methods. ([#996] by [@cmyr])
    • ViewSwitcher uses Data type constraint instead of PartialEq. ([#1112] by [@justinmoon])

    โœ‚ Removed

    • ๐Ÿง The optional GTK feature for non-Linux platforms. ([#611] by [@pyroxymat])

    ๐Ÿ›  Fixed

    • Event::HotChanged(false) will be emitted when the cursor leaves the window. ([#821] by [@teddemunnik])
    • Keep hot state consistent with mouse position. ([#841] by [@xStrom])
    • Start focus cycling from not-registered-for-focus widgets. ([#819] by [@xStrom])
    • Supply correct LifeCycleCtx to Event::FocusChanged. ([#878] by [@cmyr])
    • Propagate Event::FocusChanged to focus gaining widgets as well. ([#819] by [@xStrom])
    • Routing LifeCycle::FocusChanged to descendant widgets. ([#925] by [@yrns])
    • Focus request handling is now predictable with the last request overriding earlier ones. ([#948] by [@xStrom])
    • Open file menu item works again. ([#851] by [@kindlychung])
    • Built-in open and save menu items now show the correct label and submit the right commands. ([#930] by [@finnerale])
    • โšก๏ธ Wheel events now properly update hot state. ([#951] by [@xStrom])
    • ๐ŸŽ macOS: Support FileDialogOptions::default_type. ([#960] by [@xStrom])
    • macOS: Show the save dialog even with FileDialogOptions select_directories and multi_selection set. ([#960] by [@xStrom])
    • ๐Ÿ‘ X11: Support mouse scrolling. ([#961] by [@jneem])
    • Painter now properly repaints on data change in Container. ([#991] by [@cmyr])
    • ๐Ÿ Windows: Terminate app when all windows have closed. ([#763] by [@xStrom])
    • ๐Ÿ Windows: Respect the minimum window size. ([#727] by [@teddemunnik])
    • ๐Ÿ Windows: Respect resizability. ([#712] by [@teddemunnik])
    • ๐Ÿ Windows: Capture mouse for drag actions. ([#695] by [@teddemunnik])
    • ๐Ÿ Windows: Removed flashes of white background at the edge of the window when resizing. ([#915] by [@xStrom])
    • ๐Ÿ Windows: Reduced chance of white flash when opening a new window. ([#916] by [@xStrom])
    • ๐Ÿ Windows: Keep receiving mouse events after pressing ALT or F10 when the window has no menu. ([#997] by [@xStrom])
    • ๐ŸŽ macOS: Application::quit now quits the run loop instead of killing the process. ([#763] by [@xStrom])
    • ๐ŸŽ macOS: Event::HotChanged is properly generated with multiple windows. ([#907] by [@xStrom])
    • ๐ŸŽ macOS: The application menu is now immediately interactable after launch. ([#994] by [@xStrom])
    • ๐ŸŽ macOS/GTK: MouseButton::X1 and MouseButton::X2 clicks are now recognized. ([#843] by [@xStrom])
    • GTK: Use the system locale. ([#798] by [@finnerale])
    • ๐Ÿ GTK: Actually close windows. ([#797] by [@finnerale])
    • GTK: Prevent crashing on pop-ups. ([#837] by [@finnerale])
    • ๐Ÿ‘ GTK: Support disabled menu items. ([#897] by [@jneem])
    • ๐Ÿ”Š GTK: Support file filters in open/save dialogs. ([#903] by [@jneem])
    • ๐Ÿ‘ GTK: Support DPI values other than 96. ([#904] by [@xStrom])


    • ๐Ÿ‘Œ Improved Split accuracy. ([#738] by [@xStrom])
    • Built-in widgets no longer stroke outside their paint_rect. ([#861] by [@jneem])
    • Switch toggles with animation when its data changes externally. ([#898] by [@finnerale])
    • Render progress bar correctly. ([#949] by [@scholtzan])
    • Scrollbars animate when the scroll container size changes. ([#964] by [@xStrom])

    ๐Ÿ“„ Docs

    • โž• Added example and usage hints to Env. ([#796] by [@finnerale])
    • โž• Added documentation about the usage of bloom filters. ([#818] by [@xStrom])
    • โž• Added book chapters about Painter and Controller. ([#832] by [@cmyr])
    • โž• Added a changelog containing development since the 0.5 release. ([#889] by [@finnerale])
    • โž• Added goals section to README.md. ([#971] by [@finnerale])
    • โž• Added a section about dependencies to CONTRIBUTING.md. ([#990] by [@xStrom])
    • โšก๏ธ Updated screenshots in README.md. ([#967] by [@xStrom])
    • โœ‚ Removed references to cairo on macOS. ([#943] by [@xStrom])


    • โž• Added blocking_function. ([#840] by [@mastfissh])
    • โž• Added hot glow option to multiwin. ([#845] by [@xStrom])
    • โฌ‡๏ธ Reduce the flashing in ext_event and identity. ([#782] by [@futurepaul])
    • ๐Ÿ›  Fixed menu inconsistency across multiple windows in multiwin. ([#926] by [@kindlychung])

    ๐Ÿšง Maintenance

    • โž• Added rendering tests. ([#784] by [@fishrockz])
    • โž• Added docs generation testing for all features. ([#942] by [@xStrom])
    • Replaced #[macro_use] with normal use. ([#808] by [@totsteps])
    • Enabled Clippy checks for all targets. ([#850] by [@xStrom])
    • โšก๏ธ Revamped CI testing to optimize coverage and speed. ([#857] by [@xStrom])
    • ๐Ÿ”จ Refactored DPI scaling. ([#904] by [@xStrom])
    • ๐ŸŽ Refactored WidgetPod::event to improve readability and performance of more complex logic. ([#1001] by [@xStrom])
    • ๐Ÿ“‡ Renamed BaseState to WidgetState ([#969] by [@cmyr])
    • ๐Ÿ›  Fixed test harness crashing on failure. ([#984] by [@xStrom])
    • ๐Ÿ”จ GTK: Refactored Application to use the new structure. ([#892] by [@xStrom])

    Outside News

    • There are new projects using druid:
      • Kondo Save disk space by cleaning unneeded files from software projects.
      • jack-mixer A jack client that provides mixing, levels and a 3-band eq.
      • kiro-synth An in progress modular sound synthesizer.