Skip to content

Latest commit

 

History

History
1251 lines (1141 loc) · 75.6 KB

CHANGELOG.md

File metadata and controls

1251 lines (1141 loc) · 75.6 KB

Changelog

The latest published Druid release is 0.8.3 which was released on 2023-02-28. You can find its changes documented below.

Highlights

Added

  • Type name is now included in panic error messages in WidgetPod. (#2380 by @matthewgapp)

Changed

Deprecated

Removed

Fixed

Visual

Docs

Examples

Maintenance

Outside News

0.8.3 - 2023-02-28

Added

  • Input Region and Always On Top support. (#2328 by @jaredoconnell)
  • foreground, set_foreground, and clear_foreground methods to Container and WidgetExt::foreground method for convenience. (#2346 by @giannissc)
  • WindowHandle::hide method to hide a window. (#2191 by @newcomb-luke)

Fixed

  • AddTab is now properly exported from the widget module. (#2351 by @cbondurant)

Docs

  • Widget, WidgetExt, WidgetId, Lens and LensExt docs are visible again. (#2356 by @xStrom)
  • Deprecated items are now hidden. (#2356 by @xStrom)
  • Fixed rustdoc example scraping configuration. (#2353 by @xStrom)
  • Added info about git symlinks to CONTRIBUTING.md. (#2349 by @xStrom)

Maintenance

  • Synchronized kurbo and image imports with piet-common. (#2352 by @xStrom)

0.8.2 - 2023-01-27

Docs

  • Fixed docs.rs failing to build any docs. (#2348 by @xStrom)

0.8.1 - 2023-01-27

Docs

  • Fixed README.md selection for crates.io. (#2347 by @xStrom)

0.8.0 - 2023-01-27

Highlights

Text improvements

We now have international text input support (IME) on macOS thanks to #1619 by @lord. The TextBox widget was rewritten with IME integration in #1636 by @cmyr. Rich text and complex scripts are now supported on Linux thanks to a major Piet upgrade.

Wayland backend

We have a new experimental Wayland backend which can be enabled with the wayland feature. The work was started by @derekdreery and then later picked up by @james-lawrence in #2079, #2114, #2127 - helped along by @Maan2003. Later support was widened in #2254 by @PolyMeilex.

Added

  • RichTextBuilder for creating RichText objects. (#1520, #1596 by @Maan2003)
  • Link text attribute for links in RichText. (#1627 by @Maan2003, #1656 by @cmyr)
  • Strikethrough support in RichText. (#1953 by @jenra-uwu)
  • StringCursor::new constructor. (#2319 by @benoitryder)
  • Ctrl+C, Ctrl+X, Ctrl+V key handling for TextBox. (#1660 by @cmyr)
  • Delete key handling for TextBox. (#1746 by @bjorn)
  • Ctrl+Left, Ctrl+Right, Ctrl+Backspace, Ctrl+Delete, Home, End, PageUp, PageDown key handling for TextBox. (#1786 by @CryZe)
  • Ctrl+A key handling for TextBox. (#1931, #2031 by @Maan2003)
  • AppLauncher::localization_resources for using custom localization resources. (#1528 by @edwin0cheng)
  • Transparent window support via the WindowDesc::transparent method. (#1583, #1617 by @Ciantic for Windows, @rjwittams for macOS, @JAicewizard for GTK, and #1803 by @psychon for X11)
  • Sub windows - allow opening windows that share state with arbitrary parts of the widget hierarchy. (#1254 by @rjwittams)
  • WindowCloseRequested and WindowDisconnected events for when a window is closing. (#1254 by @rjwittams)
  • WindowHandle::content_insets. (#1532 by @rjwittams for macOS; #1592 by @HoNile for Windows; #1722, #2117 by @jneem, @maurerdietmar for GTK)
  • window_origin, to_window, and to_screen methods to EventCtx, LifeCycleCtx, UpdateCtx, and PaintCtx. (#1532 by @rjwittams)
  • WindowSizePolicy for allowing windows to be sized by their content. (#1532 by @rjwittams, #1604 by @HoNile)
  • WindowDesc::set_level method. (#1515 by @Schaback)
  • WindowDesc::with_config method to set the WindowConfig of the window. (#1929 by @Maan2003)
  • Event::WindowScale to notify widgets of the window's scale changes. (#2335 by @xStrom)
  • scale method to all contexts for widgets to easily access the window's scale. (#2335 by @xStrom)
  • raw-window-handle support via the raw-win-handle feature for Windows, macOS, and X11. ([#1586], #1828 by @djeedai; #1667 by @i509VCB; #2238 by @Azorlogh)
  • WidgetExt::on_added method to provide a closure that will be called when the widget is added to the tree. (#1485 by @arthmis)
  • set_disabled method to EventCtx, LifeCycleCtx, and UpdateCtx to disable a widget. (#1632 by @xarvic)
  • is_disabled method to EventCtx, LifeCycleCtx, UpdateCtx and PaintCtx to check if a widget is disabled. (#1632 by @xarvic)
  • LifeCycle::DisabledChanged and InternalLifeCycle::RouteDisabledChanged events for widget disabled state changes. (#1632 by @xarvic)
  • LifeCycle::BuildFocusChain to update the focus-chain. (#1632 by @xarvic)
  • scroll_to_view and scroll_area_to_view methods to EventCtx, LifeCycleCtx and UpdateCtx. (#1976 by @xarvic)
  • Notification can now be sent while handling another Notification. (#1640 by @cmyr)
  • Notification::route method to identify the last widget that the notification passed through. (#1978 by @xarvic)
  • Notification::warn_if_unused and Notification::warn_if_unused_set for whether there should be a warning when no widget handles the notification. (#2141 by @xarvic)
  • DelegateCtx::get_external_handle method. (#1526 by @Maan2003)
  • EventCtx::submit_notification_without_warning method. (#2141 by @xarvic)
  • WidgetPod::has_focus method to check if the widget or any descendent is focused. (#1825 by @ForLoveOfCats)
  • WidgetPod::layout_requested method to determine whether the widget or any of its children have requested layout. (#2145 by @xarvic)
  • Widget::compute_max_intrinsic method which determines the maximum useful dimension of the widget. (#2172 by @sjoshid)
  • LifeCycle::ViewContextChanged and InternalLifeCycle::RouteViewContextChanged events for when a widget's surroundings change. (#2149 by @xarvic)
  • ChangeCtx and RequestCtx traits for code generic over contexts. (#2149 by @xarvic)
  • should_propagate_to_hidden method on Event and LifeCycle enums. (#1724 by @xarvic)
  • Value::Other for using custom types in Env. (#1910 by @Maan2003)
  • Value::RoundedRectRadii for specifying the radius of each corner separately. (#2039 by @ngugcx)
  • Env::empty constructor for creating a set of overrides. (#1837 by @cmyr)
  • Env::try_set_raw method to try to set a resolved Value for the specified Key. (#1517 by @cmyr)
  • Key::raw method for getting the key's raw string value, useful for debugging. (#1527 by @cmyr)
  • DebugState to fetch and process the state of the widget tree for debugging purposes. (#1890 by @PoignardAzur)
  • ExtEventSink::add_idle_callback method as an alternative to commands for mutating app data from a another thread. (#1955 by @Maan2003)
  • Support for more niche keys like F13 - F24, and various media keys. (#2044 by @CryZe)
  • MouseButtons::count method to get the number of pressed buttons. (#1500 by @jjl)
  • Cursor::Pointer cursor icon. (#1612 by @Maan2003)
  • AspectRatioBox widget that preserves the aspect ratio given to it. (#1645 by @arthmis)
  • Maybe widget for switching between two possible children, for Data that is Option<T>. (#1540 by @derekdreery)
  • DisabledIf widget wrapper to disable the inner widget based on Data and Env. (#1702 by @xarvic)
  • WidgetWrapper widget for widgets that wrap a single child to expose that child for access and mutation. (#1511 by @rjwittams)
  • ZStack which is a container that stacks its children on top of each other. (#2235, #2291 by @xarvic)
  • WidgetExt::scroll method for easily encapsulating a widget in a Scroll container. (#1600 by @totsteps)
  • content_must_fill, set_content_must_fill, set_enabled_scrollbars, set_vertical_scroll_enabled, set_horizontal_scroll_enabled methods to Scroll. (#1635 by @cmyr)
  • content_must_fill, set_content_must_fill methods to ClipBox. (#1630 by @cmyr)
  • ClipBox::unmanaged constructor for when you are using ClipBox in the widget tree directly. (#2141 by @xarvic)
  • Scroll-to-view support for ClipBox and Tabs. (#2141 by @xarvic)
  • with_tab_index, set_tab_index, and tab_index methods to Tabs to control the index. (#2082 by @rjwittams
  • state and state_mut methods to Scope to get references to the inner state. (#2082 by @rjwittams
  • Slider::with_step method for stepping functionality. (#1875 by @raymanfx)
  • RangeSlider and Annotated widgets, which are both variations on Slider. (#1979 by @xarvic)
  • Checkbox::from_label constructor. (#2111 by @maurerdietmar)
  • Container::clear_background and Container::clear_border methods. (#1558 by @sjoshid)
  • CrossAxisAlignment::Fill to the Flex widget for filling the entire available cross space. (#1551 by @tirix)
  • Data implementations for more types from std. (#1534 by @derekdreery)
  • Data implementations for Key and KeyOrValue. (#1571 by @rjwittams)
  • Data implementation for ImageBuf. (#1512 by @arthmis)
  • chrono feature with Data support for chrono types. (#1743 by @r-ml)
  • Data derive macro attribute #[data(eq)], which is equivalent to #[data(same_fn = "PartialEq::eq")]. (#1884 by @Maan2003)
  • ListIter implementation for OrdMap. (#1641 by @Lejero)
  • ListIter implementations for Arc<VecDequeue<T>> and (S, Arc<VecDequeue<T>>). (#1639 by @raymanfx)
  • lens macro support for accessing nested fields. (#1764 by @Maan2003)
  • lens and lens_mut methods to LensWrap to get references to the inner lens. (#1744 by @SecondFlight)
  • Lens implementation for Lens tuples of length 2-8. (#1654 by @Maan2003)
  • Type parameters to generated lenses of generic structs, allowing for easier lens usage. (#1591 by @rjwittams)
  • Derived lens items now get auto-generated documentation. (#1696 by @lidin)
  • theme::SCROLLBAR_MIN_SIZE for specifying the minimum length for any scrollbar. (#1661 by @Cupnfish)
  • theme::SELECTED_TEXT_INACTIVE_BACKGROUND_COLOR for styling text selection in widgets that aren't focused. (#1659 by @cmyr)
  • Windows: Dark mode detection and titlebar theming. (#2196, #2204 by @dristic)
  • Windows: Use custom application icon if the resource is present. (#2274 by @tay64)
  • Windows: Implemented Application::get_locale. (#1874 by @dfrg)
  • macOS: Implemented save dialog file format selection. (#1847 by @terhechte)
  • macOS: Implemented WindowHandle::get_scale. (#2297 by @dfrg)
  • Linux: ApplicationExt::primary_clipboard method for getting a handle to the primary system clipboard. (#1843, #1873 by @Maan2003)
  • GTK: Implemented WindowHandle::handle_titlebar. (#2230 by @Steve-xmh)
  • GTK: Support for selected menu items. (#2251 by @longmathemagician)
  • GTK: Multiple file selection support in the file dialogs. ([#2081] by @Psykopear)
  • X11: set_size, get_size, set_min_size, resizable, get_position, set_position, set_level, and set_window_state implementations. (#1785 by @Maan2003)
  • X11: Support for clipboard. (#1805, #1851, #1866 by @psychon)
  • X11: Implemented ApplicationExt::primary_clipboard. (#1867 by @psychon)
  • X11: Now setting WM_CLASS property. (#1868 by @psychon)
  • X11: Support for DPI scaling. (#1751 by @Maan2003)
  • X11: Support for changing cursors. (#1755 by @Maan2003)
  • X11: Support for custom cursors. (#1801 by @psychon)
  • X11: Support for window focus events. (#1938 by @Maan2003
  • X11: Support for file dialogs. (#2153 by @jneem)
  • X11: Implemented keyboard layout detection. (#1779 by @Maan2003)
  • X11: Implemented Screen::get_monitors. (#1804 by @psychon)
  • X11: Implemented Application::get_locale. (#1756 by @Maan2003)
  • Web: Implemented Application::get_locale. (#1791 by @Maan2003)
  • OpenBSD: Support for building. (#1993 by @klemensn)
  • FreeBSD: Support for building. (#2249 by @nunotexbsd)

Changed

  • WindowDesc::new now takes the root widget directly instead of a function. (#1559 by @lassipulkkinen)
  • register_for_focus must now be called in response to LifeCycle::BuildFocusChain instead of LifeCycle::WidgetAdded. (#1632 by @xarvic)
  • Menu support was rewritten with support for Data. (#1625 by @jneem)
  • Window size and positioning code is now in display points. (#1713 by @jneem; #2297 by @raphlinus)
  • Renamed druid_shell::platform module to druid_shell::backend. (#1857 by @Maan2003)
  • WidgetPod::set_origin no longer takes data and env as parameters. (#2149 by @xarvic)
  • WidgetPod::event now propagates handled mouse events to active children. (#2235 by @xarvic)
  • WindowLevel variants Tooltip, DropDown, and Modal now require the parent window's WindowHandle. (#1919 by @JAicewizard)
  • add_idle_callback now takes &mut dyn WinHandler instead of &dyn Any. (#1787 by @jneem)
  • AppDelegate::window_added now receives the new window's WindowHandle. (#2119 by @zedseven)
  • EventCtx::focus_next, EventCtx::focus_prev and EventCtx::resign_focus can now also be called by an ancestor of a focused widget. (#1651 by @cmyr)
  • ClipBox::new constructor was renamed to ClipBox::managed. (#2141 by @xarvic)
  • ClipBox, Flex, List and Split only call layout on their children when they need it. (#2145 by @xarvic)
  • Spacers in Flex are now implemented by calculating the space in Flex instead of creating a widget for it. (#1584 by @JAicewizard)
  • Flex values less than zero will clamp to zero and warn in release mode and panic in debug mode. (#1691 by @arthmis)
  • RadioGroup::new constructor was replaced by RadioGroup::row, RadioGroup::column, and RadioGroup::for_axis. (#2157 by @twitchyliquid64)
  • Svg widget was changed from a simple custom implementation to resvg + tiny-skia to increase compatibility. (#2106 by @james-lawrence, #2335 by @xStrom)
  • Slider widget now warns if max < min and swaps the values. (#1882 by @Maan2003)
  • Padding is now generic over its child, implements the new WidgetWrapper trait. (#1634 by @cmyr)
  • Padding::new now takes impl Into<KeyOrValue<Insets>> instead of just impl Into<Insets>. (#1662 by @cmyr)
  • Container::rounded and Container::set_rounded methods now take impl Into<KeyOrValue<RoundedRectRadii>> instead of impl Into<KeyOrValue<f64>>. (#2091 by @jneem)
  • SizedBox::width and SizedBox::height methods now take impl Into<KeyOrValue<f64>> instead of just f64. (#2151 by @GoldsteinE)
  • TextBox::with_placeholder and TextBox::set_placeholder methods now take impl Into<LabelText<T>> instead of impl Into<String>. (#1908 by @Swatinem)
  • Label::new now accepts functions that return any type that implements Into<ArcStr>. (#2064 by @jplatte)
  • PROGRESS_BAR_RADIUS, BUTTON_BORDER_RADIUS, TEXTBOX_BORDER_RADIUS, and SCROLLBAR_RADIUS in theme now use RoundedRectRadii instead of f64. (#2039 by @ngugcx)
  • Optimized ListIter implementations for Arc<Vec<T>>, (S, Arc<Vec<T>>), Arc<VecDequeue<T>> and (S, Arc<VecDequeue<T>>). (#1967 by @xarvic)
  • Application can now be restarted. (#1700 by @djeedai)
  • macOS: Application::hide, Application::hide_others, Application::set_menu methods moved to ApplicationExt. (#1863 by @Maan2003)
  • X11: Query atoms only once instead of per window. (#1865 by @psychon)
  • Web: Repeated request_anim_frame calls are now ignored until the next request_animation_frame callback is executed. (#1790 by @Maan2003)

Deprecated

  • AppLauncher::use_simple_logger in favor of AppLauncher::log_to_console and AppLauncher::start_console_logging. (#1578, #1621 by @PoignardAzur; #2102 by @ratmice)
  • theme::LABEL_COLOR in favor of theme::TEXT_COLOR. (#1717 by @xarvic)
  • theme::SELECTION_COLOR in favor of theme::SELECTED_TEXT_BACKGROUND_COLOR. (#1659 by @cmyr)
  • ArcStr, FontDescriptor, FontFamily, FontStyle, FontWeight, TextAlignment, TextLayout in the druid module in favor of druid::text module. (#1689 by @cmyr)
  • Cursor::OpenHand because it is not available on Windows. (#1612 by @Maan2003)
  • command::HIDE_APPLICATION and command::HIDE_OTHERS on platforms other than macOS. (#1863 by @Maan2003)
  • menu::MenuDesc<T> in favor of menu::Menu<T> and its methods append_entry and append_separator in favor of entry and separator. (#1625 by @jneem)

Removed

  • WindowHandle::set_level method. (#1919 by @JAicewizard)
  • WidgetPod::set_layout_rect because it was deprecated and no longer doing what it claimed. (#2340 by @xStrom)
  • Default implementation for FlexParams. (#1885 by @Maan2003)
  • Default implementation for Env and theme::init function. (#1837 by @cmyr)

Fixed

  • TextBox text clipping. (#1775 by @CryZe)
  • TextBox caret clipping is now more consistent with text clipping. (#1712 by @andrewhickman)
  • TextBox caret not being pixel aligned. (#1794 by @CryZe)
  • TextBox selection alignment offset. (#1769 by @CryZe)
  • TextBox placeholder text alignment. (#1856 by @cmyr)
  • Single line TextBox now resets its scroll position on focus loss. (#1663 by @cmyr)
  • Double- or triple-clicking on text to select a word/paragraph and then dragging to select even more. (#1665, #1666 by @cmyr)
  • Selecting the last word in text. (#1893 by @Maan2003)
  • RichText now invalidates its layout when Env changes. (#1907 by @Maan2003)
  • Split no longer causes cursor flicker when the mouse moves fast. (#1726 by @djeedai)
  • Focus-chain no longer contains hidden widgets. (#1724 by @xarvic)
  • Scrollbar layout with very small viewports. (#1715 by @andrewhickman)
  • Scrollbars no longer remain permanently visible when the mouse leaves the window. (#2343 by @xStrom)
  • Hot state now works properly inside Scroll. (#2149 by @xarvic)
  • Scroll now behaves properly inside of Flex. (#1506 by @tirix)
  • Either and Tab widgets no longer propagate events to hidden children. (#1860 by @lisael)
  • Panic due to using incorrect flex params in Tabs. (#1740 by @Maan2003)
  • Painter now requests paint when the BackgroundBrush changes. (#1881 by @Maan2003)
  • Keep baseline offset in Align, Container, Flex, and Padding. (#2078 by @maurerdietmar)
  • Env changes now properly invalidate stale Container, Flex, and List. (#1894 by @Maan2003)
  • Data implementation for kurbo::RoundedRect. (#1618 by @JAicewizard)
  • Parse now properly handles floats. (#2148 by @superfell)
  • Image now preserves the aspect ratio of a clipped region. (#2195 by @barsae)
  • Numerical imprecision in ClipBox layout. (#1776 by @jneem)
  • serde feature now properly propagates to the embedded kurbo crate. (#1871 by @Kethku)
  • Notification no longer received by the widget that sent it. (#1640 by @cmyr)
  • ListIter implementations for im::Vector<T> and (S, im::Vector<T>). (#1967 by @xarvic)
  • Windows: Alt+Tab now works properly when using Narrator. (#2026 by @mwcampbell)
  • Windows: Windows without titlebars can now be minimized. (#2038 by @ngugcx)
  • Windows: No longer panicking on startup when no window size is specified. (#1575 by @Perlmint)
  • Windows: Now accounting for scale when setting the initial window position. (#2296 by @xStrom)
  • Windows: Ctrl+Backspace now properly deletes the left word in text. (#1574 by @Ciantic)
  • Windows: WindowLevel::Tooltip no longer steals focus, has a taskbar icon, or an incorrect size. (#1737 by @djeedai)
  • macOS: Menus are now properly initialized. (#1846 by @terhechte)
  • macOS: Creating a window with WindowState::Maximized now has correct layout. (#1692 by @JarrettBillingsley)
  • macOS: Mouse leave events are now working properly on macOS 13. (#2282 by @liias)
  • GTK: Window maximizing works now. (#2118 by @Pavel-N)
  • GTK: Hot state now properly resets when the mouse leaves the window via an occluded part. (#2324 by @xStrom)
  • GTK: Avoid undefined behavior when requesting animation frames. (#1832 by @JAicewizard)
  • GTK: Meta key modifier now works. (#2293 by @lzhoucs)
  • GTK: Shift+Tab not recognized as a Tab press. (#1597 by @cmyr)
  • GTK: No longer mangling newline characters in clipboard. (#1695 by @ForLoveOfCats)
  • GTK: Replaced call to std::str::from_utf8_unchecked with from_utf8. (#1820 by @psychon)
  • GTK: Screen::get_monitors no longer panics due to GDK not being initialized. (#1946 by @JAicewizard)
  • X11: Screen::get_monitors no longer panics due to Application not being initialized. (#1996 by @Maan2003)
  • Web: Key down events are now handled correctly. (#1792 by @Maan2003)

Visual

Docs

Examples

Maintenance

0.7.0 - 2021-01-01

Highlights

  • Text improvements: TextLayout type (#1182) and rich text support (#1245).
  • The Formatter trait provides more flexible handling of conversions between values and their textual representations. (#1377)

Added

  • RichText and Attribute types for creating rich text. (#1255 by @cmyr)
  • RawLabel widget for displaying text Data. (#1252 by @cmyr)
  • TextBox now supports ctrl and shift hotkeys. (#1076 by @vkahl)
  • TextBox selected text color customization. (#1093 by @sysint64)
  • TextBox vertical movement support. (#1280 by @cmyr)
  • TextBox::with_text_color and TextBox::set_text_color. (#1320 by @cmyr)
  • TextBox::with_text_alignment and TextBox::set_text_alignment. (#1371 by @cmyr)
  • TextLayout type simplifies drawing text (#1182 by @cmyr)
  • TextAlignment support in TextLayout and Label. (#1210 by @cmyr)
  • LineBreaking enum allows configuration of label line-breaking. (#1195 by @cmyr)
  • Formatter trait for value formatting. (#1377 by @cmyr)
  • Checkbox::set_text to update the label. (#1346 by @finnerale)
  • Button::from_label to construct a Button with a provided Label. (#1226 by @ForLoveOfCats)
  • Widgets can specify a baseline, Flex rows can align baselines. (#1295 by @cmyr)
  • ClipBox widget for building scrollable widgets. (#1248 by @jneem)
  • Tabs widget allowing tabbed layouts. (#1160 by @rjwittams)
  • 'Scope' widget to allow encapsulation of reactive state. (#1151 by @rjwittams)
  • ScrollComponent for ease of adding consistent, customized, scrolling behavior to a widget. (#1107 by @ForLoveOfCats)
  • OPEN_PANEL_CANCELLED and SAVE_PANEL_CANCELLED commands. (#1061 by @cmyr)
  • BoxConstraints::UNBOUNDED constant. (#1126 by @danieldulaney)
  • Close requests from the shell can now be intercepted. (#1118 by @jneem, #1204 by @psychon, #1238 by @tay64)
  • Lens derive now supports an ignore attribute. (#1133 by @jneem)
  • Ref lens that applies AsRef and thus allow indexing arrays. (#1171 by @finnerale)
  • request_update method to EventCtx. (#1128 by @raphlinus)
  • env_changed and env_key_changed methods to UpdateCtx. (#1207 by @cmyr)
  • request_timer method to LayoutCtx. (#1278 by @Majora320)
  • ExtEventSinks can now be obtained from widget methods. (#1152 by @jneem)
  • Command::to and Command::target to set and get a commands target. (#1185 by @finnerale)
  • Menu commands can now choose a custom target. (#1185 by @finnerale)
  • Movement::StartOfDocument, Movement::EndOfDocument. (#1092 by @sysint64)
  • Implementation of Data trait for i128 and u128 primitive data types. (#1214 by @koutoftimer)
  • Unit lens for type erased or display only widgets that do not need data. (#1232 by @rjwittams)
  • WindowLevel to control system window Z order, with macOS and GTK implementations. (#1231 by @rjwittams)
  • WIDGET_PADDING_HORIZONTAL and WIDGET_PADDING_VERTICAL to theme and Flex::with_default_spacer / Flex::add_default_spacer. (#1220 by @cmyr)
  • CONFIGURE_WINDOW command to allow reconfiguration of an existing window. (#1235 by @rjwittams)
  • Event::should_propagate_to_hidden and Lifecycle::should_propagate_to_hidden to determine whether an event should be sent to hidden widgets (e.g. in Tabs or Either). (#1351 by @andrewhickman)
  • Custom mouse cursors. (#1183 by @jneem)
  • set_cursor can be called in the update method. (#1361 by @jneem)
  • WidgetPod::is_initialized to check if a widget has received WidgetAdded. (#1259 by @finnerale)
  • Scalable re-exported under druid namespace. (#1075 by @ForLoveOfCats)
  • Default minimum size to WindowConfig. (#1438 by @colinfruit)
  • Windows: Screen module to get information about monitors and the screen. (#1037 by @rhzk)
  • Windows: Internal functions to handle re-entrancy. (#1037 by @rhzk)
  • Windows: Ability to create a window with disabled titlebar, maximized or minimized state, and with position. (#1037 by @rhzk)
  • Windows: Ability to change window state. Toggle titlebar. Change size and position of window. (#1037, #1324 by @rhzk)
  • Windows: handle_titlebar to allow a custom titlebar to behave like the OS one. (#1037 by @rhzk)
  • Windows: Dialogs now respect the parameter passed to force_starting_directory. (#1452 by @MaximilianKoestler)

Changed

  • Keyboard event handling was majorly reworked. (#1049 by @raphlinus)
  • Now using the new Piet text API. (#1143 by @cmyr)
  • Scale::from_scale to Scale::new, and Scale methods scale_x / scale_y to x / y. (#1042 by @xStrom)
  • Container::rounded takes KeyOrValue<f64> instead of f64. (#1054 by @binomial0)
  • request_anim_frame no longer invalidates the entire window. (#1057 by @jneem)
  • Env::try_get (and related methods) now return a Result instead of an Option. (#1172 by @cmyr)
  • lens! macro now uses move semantics for the index. (#1171 by @finnerale)
  • Env now stores Arc<str> instead of String. (#1173 by @cmyr)
  • Open and save dialogs now send configurable commands. (#1463 by @jneem)
  • Replaced uses of Option<Target> with the new Target::Auto. (#1185 by @finnerale)
  • Moved the Target parameter from submit_command to Command::new and Command::to. (#1185 by @finnerale)
  • Movement::RightOfLine to Movement::NextLineBreak, and Movement::LeftOfLine to Movement::PrecedingLineBreak. (#1092 by @sysint64)
  • AnimFrame was moved from lifecycle to event. (#1155 by @jneem)
  • Renamed ImageData to ImageBuf and moved it to druid_shell. (#1183 by @jneem)
  • Contexts' text methods now return &mut PietText instead of cloning. (#1205 by @cmyr)
  • WindowDesc decomposed to PendingWindow and WindowConfig to allow for sub-windows and reconfiguration. (#1235 by @rjwittams)
  • LocalizedString and LabelText now use ArcStr instead of String. (#1245 by @cmyr)
  • LensWrap widget moved into the widget module. (#1251 by @cmyr)
  • Delegate::command now returns Handled instead of bool. (#1298 by @jneem)
  • TextBox now selects all contents when tabbed to on macOS. (#1283 by @cmyr)
  • All Image formats are now optional, reducing compile time and binary size by default. (#1340 by @JAicewizard)
  • The Cursor API has changed to a stateful one. (#1433 by @jneem)
  • Part of the SAVE_FILE command is now SAVE_FILE_AS. (#1463 by @jneem)
  • Image and ImageData are now exported by default. (#1011 by @covercash2)
  • ViewSwitcher uses Data type constraint instead of PartialEq. ([#1112] by @justinmoon)
  • Windows: Reduced flashing when windows are created on high-DPI displays. (#1272 by @rhzk)
  • Windows: Improved DPI handling. Druid should now redraw correctly when DPI changes. (#1037 by @rhzk)
  • Windows: A new window is created with the OS default size unless otherwise specified. (#1037 by @rhzk)

Deprecated

  • KeyCode in favor of KbKey and KeyModifiers in favor of Modifiers. (#1049 by @raphlinus)
  • Parse widget in favor of the Formatter trait and WidgetExt::parse method in favor of TextBox::with_formatter. (#1377 by @cmyr)
  • Region::to_rect method in favor of Region::bounding_box. (#1338 by @cmyr)
  • theme::init function in favor of Env::default method. (#1237 by @totsteps)

Removed

Fixed

  • ClipBox now forwards events if any child is active, not just the immediate child. (#1448 by @derekdreery)
  • Data derive now works when type param bounds are defined. (#1058 by @chris-zen)
  • update is now called after all commands. (#1062 by @jneem)
  • Align widget no longer has blurry borders. (#1091 by @sysint64)
  • EnvScope now also updates the Env during Widget::lifecycle. (#1100 by @finnerale)
  • WidgetExt::debug_widget_id and debug_paint_layout now also apply to the widget they are called on. (#1100 by @finnerale)
  • ViewSwitcher now skips the update after switching widgets. (#1113 by @finnerale)
  • Key and KeyOrValue derive Clone. (#1119 by @rjwittams)
  • submit_command now allowed from the layout method. (#1119 by @rjwittams)
  • Derivation of lenses now allowed for generic types. (#1120) by @rjwittams)
  • Switch widget's toggle animation is no longer refresh rate dependent. (#1145 by @ForLoveOfCats)
  • Image widget now computes the layout correctly when unbound in one direction. (#1189 by @JAicewizard)
  • TextBox now resets cursor position after being unfocused. (#1276 by @sysint64)
  • The scroll bar now shows when the contents of a scrollable area change size. (#1278 by @Majora320)
  • Either now uses the correct paint insets. (#1299 by @andrewhickman)
  • Either now correctly passes events to its hidden child. (#1351 by @andrewhickman)
  • No longer dropping events while showing file dialogs. (#1302, #1328 by @jneem)
  • LifeCycle::WidgetAdded is now the first event a widget receives. (#1259 by @finnerale)
  • Various fixes to cross-platform menus. (#1306 by @raphlinus)
  • Windows: Improved Windows 7 DXGI compatibility. (#1311 by @raphlinus)
  • Windows: Fixed crash on resize from incompatible resources. (#1191 by @raphlinus])
  • Windows: Multi-click now partially fixed. (#1157 by @raphlinus)
  • Windows: Clipboard is now properly closed. (#1410 by @andrewhickman)
  • macOS: Fixed timers not firing during modal loop. (#1028 by @xStrom)
  • GTK: Directory selection now properly ignores file filters. (#957 by @xStrom)
  • GTK: Fixed crash when receiving an external command while a file dialog is visible. (#1043 by @jneem)
  • GTK: Fixed KeyEvent.repeat being interrupted when releasing another key. (#1081 by @raphlinus)
  • GTK: Made dependencies optional, facilitating a pure X11 build. (#1241 by @finnerale)
  • X11: Added support for idle callbacks. (#1072 by @jneem)
  • X11: Set some more common window properties. (#1097 by @psychon)
  • X11: Added support for timers. (#1096 by @psychon)
  • X11: Fixed errors caused by destroyed windows. (#1103 by @jneem)

Visual

  • TextBox stroke remains inside its paint_rect. (#1007 by @jneem)

Docs

  • Added a book chapter about resolution independence. (#913 by @xStrom)
  • Added documentation for the Image widget. (#1018 by @covercash2)
  • Added documentation to resizable and show_titlebar in WindowDesc. (#1037 by @rhzk)
  • Fixed a link in druid::command documentation. (#1008 by @covercash2)
  • Fixed broken links in druid::widget::Container documentation. (#1357 by @StarfightLP)

Examples

Maintenance

  • Standardized web targeting terminology. (#1013 by @xStrom)
  • Added debug_panic macro for when a backtrace is useful but a panic unnecessary. (#1259 by @finnerale)
  • X11: Ported the X11 backend to x11rb. (#1025 by @jneem)

0.6.0 - 2020-06-01

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)

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)

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)

Visual

  • 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)

Examples

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.

0.5.0 - 2020-04-01

Last release without a changelog :(

0.4.0 - 2019-12-28

0.3.2 - 2019-11-05

0.3.1 - 2019-11-04

0.3.0 - 2019-11-02

0.1.1 - 2018-11-02

0.1.0 - 2018-11-02