The latest published Druid release is 0.8.3 which was released on 2023-02-28. You can find its changes documented below.
- Type name is now included in panic error messages in
WidgetPod
. (#2380 by @matthewgapp) set_mouse_pass_through
sets whether the mouse passes through the window to whatever is behind. (#2402 by @AlexKnauth)is_foreground_window
returns true if the window is the foreground window or this is unknown, and returns false if a different window is known to be the foreground window. (#2402 by @AlexKnauth)
syn
featureextra-traits
is now always enabled. (#2375 by @AtomicGamer9523)- Title bar color was opposite of the system theme on Windows. (#2378 by @Insprill)
0.8.3 - 2023-02-28
- Input Region and Always On Top support. (#2328 by @jaredoconnell)
foreground
,set_foreground
, andclear_foreground
methods toContainer
andWidgetExt::foreground
method for convenience. (#2346 by @giannissc)WindowHandle::hide
method to hide a window. (#2191 by @newcomb-luke)
AddTab
is now properly exported from thewidget
module. (#2351 by @cbondurant)
Widget
,WidgetExt
,WidgetId
,Lens
andLensExt
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)
0.8.2 - 2023-01-27
0.8.1 - 2023-01-27
0.8.0 - 2023-01-27
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.
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.
RichTextBuilder
for creatingRichText
objects. (#1520, #1596 by @Maan2003)Link
text attribute for links inRichText
. (#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
andWindowDisconnected
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
, andto_screen
methods toEventCtx
,LifeCycleCtx
,UpdateCtx
, andPaintCtx
. (#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 theWindowConfig
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 theraw-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 toEventCtx
,LifeCycleCtx
, andUpdateCtx
to disable a widget. (#1632 by @xarvic)is_disabled
method toEventCtx
,LifeCycleCtx
,UpdateCtx
andPaintCtx
to check if a widget is disabled. (#1632 by @xarvic)LifeCycle::DisabledChanged
andInternalLifeCycle::RouteDisabledChanged
events for widget disabled state changes. (#1632 by @xarvic)LifeCycle::BuildFocusChain
to update the focus-chain. (#1632 by @xarvic)scroll_to_view
andscroll_area_to_view
methods toEventCtx
,LifeCycleCtx
andUpdateCtx
. (#1976 by @xarvic)Notification
can now be sent while handling anotherNotification
. (#1640 by @cmyr)Notification::route
method to identify the last widget that the notification passed through. (#1978 by @xarvic)Notification::warn_if_unused
andNotification::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
andInternalLifeCycle::RouteViewContextChanged
events for when a widget's surroundings change. (#2149 by @xarvic)ChangeCtx
andRequestCtx
traits for code generic over contexts. (#2149 by @xarvic)should_propagate_to_hidden
method onEvent
andLifeCycle
enums. (#1724 by @xarvic)Value::Other
for using custom types inEnv
. (#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 resolvedValue
for the specifiedKey
. (#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, forData
that isOption<T>
. (#1540 by @derekdreery)DisabledIf
widget wrapper to disable the inner widget based onData
andEnv
. (#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 aScroll
container. (#1600 by @totsteps)content_must_fill
,set_content_must_fill
,set_enabled_scrollbars
,set_vertical_scroll_enabled
,set_horizontal_scroll_enabled
methods toScroll
. (#1635 by @cmyr)content_must_fill
,set_content_must_fill
methods toClipBox
. (#1630 by @cmyr)ClipBox::unmanaged
constructor for when you are usingClipBox
in the widget tree directly. (#2141 by @xarvic)- Scroll-to-view support for
ClipBox
andTabs
. (#2141 by @xarvic) with_tab_index
,set_tab_index
, andtab_index
methods toTabs
to control the index. (#2082 by @rjwittamsstate
andstate_mut
methods toScope
to get references to the inner state. (#2082 by @rjwittamsSlider::with_step
method for stepping functionality. (#1875 by @raymanfx)RangeSlider
andAnnotated
widgets, which are both variations onSlider
. (#1979 by @xarvic)Checkbox::from_label
constructor. (#2111 by @maurerdietmar)Container::clear_background
andContainer::clear_border
methods. (#1558 by @sjoshid)CrossAxisAlignment::Fill
to theFlex
widget for filling the entire available cross space. (#1551 by @tirix)Data
implementations for more types fromstd
. (#1534 by @derekdreery)Data
implementations forKey
andKeyOrValue
. (#1571 by @rjwittams)Data
implementation forImageBuf
. (#1512 by @arthmis)chrono
feature withData
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 forOrdMap
. (#1641 by @Lejero)ListIter
implementations forArc<VecDequeue<T>>
and(S, Arc<VecDequeue<T>>)
. (#1639 by @raymanfx)lens
macro support for accessing nested fields. (#1764 by @Maan2003)lens
andlens_mut
methods toLensWrap
to get references to the inner lens. (#1744 by @SecondFlight)Lens
implementation forLens
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
, andset_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)
WindowDesc::new
now takes the root widget directly instead of a function. (#1559 by @lassipulkkinen)register_for_focus
must now be called in response toLifeCycle::BuildFocusChain
instead ofLifeCycle::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 todruid_shell::backend
. (#1857 by @Maan2003) WidgetPod::set_origin
no longer takesdata
andenv
as parameters. (#2149 by @xarvic)WidgetPod::event
now propagates handled mouse events to active children. (#2235 by @xarvic)WindowLevel
variantsTooltip
,DropDown
, andModal
now require the parent window'sWindowHandle
. (#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'sWindowHandle
. (#2119 by @zedseven)EventCtx::focus_next
,EventCtx::focus_prev
andEventCtx::resign_focus
can now also be called by an ancestor of a focused widget. (#1651 by @cmyr)ClipBox::new
constructor was renamed toClipBox::managed
. (#2141 by @xarvic)ClipBox
,Flex
,List
andSplit
only calllayout
on their children when they need it. (#2145 by @xarvic)- Spacers in
Flex
are now implemented by calculating the space inFlex
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 byRadioGroup::row
,RadioGroup::column
, andRadioGroup::for_axis
. (#2157 by @twitchyliquid64)Svg
widget was changed from a simple custom implementation toresvg
+tiny-skia
to increase compatibility. (#2106 by @james-lawrence, #2335 by @xStrom)Slider
widget now warns ifmax
<min
and swaps the values. (#1882 by @Maan2003)Padding
is now generic over its child, implements the newWidgetWrapper
trait. (#1634 by @cmyr)Padding::new
now takesimpl Into<KeyOrValue<Insets>>
instead of justimpl Into<Insets>
. (#1662 by @cmyr)Container::rounded
andContainer::set_rounded
methods now takeimpl Into<KeyOrValue<RoundedRectRadii>>
instead ofimpl Into<KeyOrValue<f64>>
. (#2091 by @jneem)SizedBox::width
andSizedBox::height
methods now takeimpl Into<KeyOrValue<f64>>
instead of justf64
. (#2151 by @GoldsteinE)TextBox::with_placeholder
andTextBox::set_placeholder
methods now takeimpl Into<LabelText<T>>
instead ofimpl Into<String>
. (#1908 by @Swatinem)Label::new
now accepts functions that return any type that implementsInto<ArcStr>
. (#2064 by @jplatte)PROGRESS_BAR_RADIUS
,BUTTON_BORDER_RADIUS
,TEXTBOX_BORDER_RADIUS
, andSCROLLBAR_RADIUS
intheme
now useRoundedRectRadii
instead off64
. (#2039 by @ngugcx)- Optimized
ListIter
implementations forArc<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 toApplicationExt
. (#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 nextrequest_animation_frame
callback is executed. (#1790 by @Maan2003)
AppLauncher::use_simple_logger
in favor ofAppLauncher::log_to_console
andAppLauncher::start_console_logging
. (#1578, #1621 by @PoignardAzur; #2102 by @ratmice)theme::LABEL_COLOR
in favor oftheme::TEXT_COLOR
. (#1717 by @xarvic)theme::SELECTION_COLOR
in favor oftheme::SELECTED_TEXT_BACKGROUND_COLOR
. (#1659 by @cmyr)ArcStr
,FontDescriptor
,FontFamily
,FontStyle
,FontWeight
,TextAlignment
,TextLayout
in thedruid
module in favor ofdruid::text
module. (#1689 by @cmyr)Cursor::OpenHand
because it is not available on Windows. (#1612 by @Maan2003)command::HIDE_APPLICATION
andcommand::HIDE_OTHERS
on platforms other than macOS. (#1863 by @Maan2003)menu::MenuDesc<T>
in favor ofmenu::Menu<T>
and its methodsappend_entry
andappend_separator
in favor ofentry
andseparator
. (#1625 by @jneem)
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 forFlexParams
. (#1885 by @Maan2003)Default
implementation forEnv
andtheme::init
function. (#1837 by @cmyr)
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 whenEnv
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 ofFlex
. (#1506 by @tirix)Either
andTab
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 theBackgroundBrush
changes. (#1881 by @Maan2003)- Keep baseline offset in
Align
,Container
,Flex
, andPadding
. (#2078 by @maurerdietmar) Env
changes now properly invalidate staleContainer
,Flex
, andList
. (#1894 by @Maan2003)Data
implementation forkurbo::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 embeddedkurbo
crate. (#1871 by @Kethku)Notification
no longer received by the widget that sent it. (#1640 by @cmyr)ListIter
implementations forim::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
withfrom_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 toApplication
not being initialized. (#1996 by @Maan2003) - Web: Key down events are now handled correctly. (#1792 by @Maan2003)
- Widgets have a new look and feel when disabled. (#1717 by @xarvic)
Tabs
widget's close button is now painted with strokes instead of a rendered font. (#1510 by @rjwittams)Checkbox
widget's checkmark is now properly centered. (#2036 by @agentsim)- The Druid project itself has a new logo. (#1550 by @neurotok, #1916 by @PoignardAzur)
- Rewrote multiple chapters of the Druid book. (#2301 by @PoignardAzur)
- Rewrote the lens chapter of the Druid book. (#1444 by @derekdreery)
- Fixed example code in the Get started with Druid chapter of the book. (#1698 by @ccqpein)
- Added more detailed explanation of
Target::Auto
. (#1761 by @arthmis) - Added code examples to
TextBox
docs. (#2284 by @ThomasMcandrew) - Added a link to the druid_widget_nursery to
README.md
. (#1754 by @xarvic) - Updated docs of
should_propagate_to_hidden
,children_changed
andregister_for_focus
. (#1861 by @xarvic) - Updated
Event::AnimFrame
docs with info about whenpaint
happens. (#2323 by @xStrom) - Updated
CONTRIBUTING.md
to usecargo-edit
0.11. (#2330 by @xStrom) - Fixed docs of derived
Lens
. (#1523 by @Maan2003) - Fixed docs of
RawLabel
. (#1886 by @Maan2003) - Fixed docs describing the
ViewSwitcher
widget functionality. (#1693 by @arthmis) - Fixed all the broken links that originated from Druid crates. (#2338 by @xStrom, #1730 by @RichardPoole42, #2158 by @yrns)
- Removed outdated section in
LifeCycle::WidgetAdded
docs. (#2320 by @sprocklem) - Removed outdated line in
KeyEvent
docs. (#2247 by @amtep) - Implemented standardized Druid naming convention. (#2337 by @xStrom)
- Added a readme describing all the examples. (#1423 by @JAicewizard, #1992 by @winksaville)
- Added
markdown_preview
to demonstrate rich text. (#1513 by @cmyr) - Added
transparency
to demonstrate transparent windows. (#1583 by @Ciantic) - Added
slider
to demonstrateSlider
andRangeSlider
. (#1979 by @xarvic) - Added
z_stack
to demonstrateZStack
. (#2235 by @xarvic) - Added
FillStrat
andInterpolationMode
usage to theimage
example. (#1447 by @JAicewizard) - Cleaned up
game_of_life
. (#1443 by @JAicewizard) open_save
now correctly shows the open dialog when pressing the open button. (#1914 by @minimal-state)value_formatting
now correctly handles currency validation errors. (#1842 by @cmyr)- Windows: No longer opening the console when launching the examples. (#1897 by @PoignardAzur)
- Replaced
lazy_static
withonce_cell
. (#2263 by @jplatte) - Updated
piet-common
to 0.6,kurbo
to 0.9. (#1677, #2040 by @cmyr; #1845 by @JAicewizard; #2290 by @jneem) - Updated
cairo-rs
,cairo-sys-rs
,gdk-sys
,gtk-rs
,glib-sys
,gtk-sys
to 0.16. (#1845 by @JAicewizard, #2290 by @jneem) - Updated
x11rb
to 0.10. (#1519, #2231 by @psychon) - Updated
fluent-bundle
to 0.15 andfluent-syntax
to 0.11. (#1772 by @r-ml) - Updated
tracing-wasm
to 0.2. (#1793 by @Maan2003) - Updated
tracing-subscriber
to 0.3. (#2048 by @jplatte) - Updated
usvg
to 0.25. (#1802 by @r-ml, #2106 by @james-lawrence, #2345 by @xStrom) - Updated
time
to 0.3. (#1969 by @PoignardAzur) - Updated
keyboard-types
to 0.6. (#2044 by @CryZe) - Updated
nix
to 0.24. (#2218 by @Maan2003) - Updated
bindgen
to 0.61. (#2276 by @jplatte) - Updated
float-cmp
to 0.9. (#2329 by @xStrom) - Unified window size rounding strategy. (#2297 by @xStrom)
- Unified
Selection
andMovement
intodruid-shell
. (#1653, #1655 by @cmyr) - Updated Rust edition to 2021 in all Druid crates except
druid-derive
. (#2327 by @xStrom) - Updated source code, tests, and docs to use
Selector::with
instead ofCommand::new
. (#1761 by @arthmis) - Switched to trace-based logging, added some tracing and logging. (#1578, #1621 by @PoignardAzur; #2203 by @NickLarsenNZ)
- Converted all calls of
approx_eq!
in tests toassert_approx_eq!
. (#2331 by @cbondurant) - X11: Added logging to
Application::get_locale
. (#1876 by @Maan2003)
0.7.0 - 2021-01-01
- 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)
RichText
andAttribute
types for creating rich text. (#1255 by @cmyr)RawLabel
widget for displaying textData
. (#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
andTextBox::set_text_color
. (#1320 by @cmyr)TextBox::with_text_alignment
andTextBox::set_text_alignment
. (#1371 by @cmyr)TextLayout
type simplifies drawing text (#1182 by @cmyr)TextAlignment
support inTextLayout
andLabel
. (#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 aButton
with a providedLabel
. (#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
andSAVE_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 anignore
attribute. (#1133 by @jneem)Ref
lens that appliesAsRef
and thus allow indexing arrays. (#1171 by @finnerale)request_update
method toEventCtx
. (#1128 by @raphlinus)env_changed
andenv_key_changed
methods toUpdateCtx
. (#1207 by @cmyr)request_timer
method toLayoutCtx
. (#1278 by @Majora320)ExtEventSink
s can now be obtained from widget methods. (#1152 by @jneem)Command::to
andCommand::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 fori128
andu128
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
andWIDGET_PADDING_VERTICAL
totheme
andFlex::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
andLifecycle::should_propagate_to_hidden
to determine whether an event should be sent to hidden widgets (e.g. inTabs
orEither
). (#1351 by @andrewhickman)- Custom mouse cursors. (#1183 by @jneem)
set_cursor
can be called in theupdate
method. (#1361 by @jneem)WidgetPod::is_initialized
to check if a widget has receivedWidgetAdded
. (#1259 by @finnerale)Scalable
re-exported underdruid
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)
- Keyboard event handling was majorly reworked. (#1049 by @raphlinus)
- Now using the new Piet text API. (#1143 by @cmyr)
Scale::from_scale
toScale::new
, andScale
methodsscale_x
/scale_y
tox
/y
. (#1042 by @xStrom)Container::rounded
takesKeyOrValue<f64>
instead off64
. (#1054 by @binomial0)request_anim_frame
no longer invalidates the entire window. (#1057 by @jneem)Env::try_get
(and related methods) now return aResult
instead of anOption
. (#1172 by @cmyr)lens!
macro now uses move semantics for the index. (#1171 by @finnerale)Env
now storesArc<str>
instead ofString
. (#1173 by @cmyr)- Open and save dialogs now send configurable commands. (#1463 by @jneem)
- Replaced uses of
Option<Target>
with the newTarget::Auto
. (#1185 by @finnerale) - Moved the
Target
parameter fromsubmit_command
toCommand::new
andCommand::to
. (#1185 by @finnerale) Movement::RightOfLine
toMovement::NextLineBreak
, andMovement::LeftOfLine
toMovement::PrecedingLineBreak
. (#1092 by @sysint64)AnimFrame
was moved fromlifecycle
toevent
. (#1155 by @jneem)- Renamed
ImageData
toImageBuf
and moved it todruid_shell
. (#1183 by @jneem) - Contexts'
text
methods now return&mut PietText
instead of cloning. (#1205 by @cmyr) WindowDesc
decomposed toPendingWindow
andWindowConfig
to allow for sub-windows and reconfiguration. (#1235 by @rjwittams)LocalizedString
andLabelText
now useArcStr
instead ofString
. (#1245 by @cmyr)LensWrap
widget moved into thewidget
module. (#1251 by @cmyr)Delegate::command
now returnsHandled
instead ofbool
. (#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 nowSAVE_FILE_AS
. (#1463 by @jneem) Image
andImageData
are now exported by default. (#1011 by @covercash2)ViewSwitcher
usesData
type constraint instead ofPartialEq
. ([#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)
KeyCode
in favor ofKbKey
andKeyModifiers
in favor ofModifiers
. (#1049 by @raphlinus)Parse
widget in favor of theFormatter
trait andWidgetExt::parse
method in favor ofTextBox::with_formatter
. (#1377 by @cmyr)Region::to_rect
method in favor ofRegion::bounding_box
. (#1338 by @cmyr)theme::init
function in favor ofEnv::default
method. (#1237 by @totsteps)
Scale::from_dpi
,Scale::dpi_x
, andScale::dpi_y
. (#1042 by @xStrom)Scale::to_px
andScale::to_dp
. (#1075 by @ForLoveOfCats)
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 theEnv
duringWidget::lifecycle
. (#1100 by @finnerale)WidgetExt::debug_widget_id
anddebug_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
andKeyOrValue
deriveClone
. (#1119 by @rjwittams)submit_command
now allowed from thelayout
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)
- Added a book chapter about resolution independence. (#913 by @xStrom)
- Added documentation for the
Image
widget. (#1018 by @covercash2) - Added documentation to
resizable
andshow_titlebar
inWindowDesc
. (#1037 by @rhzk) - Fixed a link in
druid::command
documentation. (#1008 by @covercash2) - Fixed broken links in
druid::widget::Container
documentation. (#1357 by @StarfightLP)
- Added
event_viewer
example. (#1326 by @cmyr) - Renamed
ext_event
toasync_event
. (#1401 by @JAicewizard) - Feature requirements now specified in a standard way. (#1050 by @xStrom)
- 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
@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.
@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.
@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.
- Standardized and exposed more methods on more contexts. (#970, #972, #855 by @cmyr, #898 by @finnerale, #954 by @xStrom, #917 by @jneem)
im
feature, withData
support for theim
crate collections. (#924 by @cmyr)im::Vector
support for theList
widget. (#940 by @xStrom)TextBox
can receiveEditAction
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 simpleString
). (#869 by @cmyr) Label::with_font
andset_font
. (#785 by @thecodewarrior)MouseEvent
now has afocus
field which istrue
with window focusing left clicks on macOS. (#842 by @xStrom)MouseButtons
toMouseEvent
to track which buttons are being held down during an event. (#843 by @xStrom)Env
andKey
gained methods for inspecting anEnv
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
methodsdefault_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)
- Renamed
WidgetPod
methods:paint
topaint_raw
,paint_with_offset
topaint
,paint_with_offset_always
topaint_always
. (#980 by @totsteps) - Renamed
Event::MouseMoved
toMouseMove
. (#825 by @teddemunnik) - Renamed
Split
constructors toSplit::rows
andcolumns
. (#738 by @xStrom) - Replaced
NEW_WINDOW
,SET_MENU
andSHOW_CONTEXT_MENU
commands with methods onEventCtx
andDelegateCtx
. (#931 by @finnerale) - Replaced
Command::one_shot
and::take_object
with aSingleUse
payload wrapper type. (#959 by @finnerale) Command
andSelector
have been reworked and are now statically typed, similarly toEnv
andKey
. (#993 by @finnerale)AppDelegate::command
now receives aTarget
instead of a&Target
. (#909 by @xStrom)SHOW_WINDOW
andCLOSE_WINDOW
commands now only useTarget
to determine the affected window. (#928 by @finnerale)- Global
Application
associated functions are instance methods instead, e.g.Application::global().quit()
instead of the oldApplication::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 requiresLayoutCtx
, data andEnv
. (#841 by @xStrom)request_timer
usesDuration
instead ofInstant
. (#847 by @finnerale)Event::Wheel
now contains aMouseEvent
structure. (#895 by @teddemunnik)- The
WindowHandle::get_dpi
method got replaced byWindowHandle::get_scale
. (#904 by @xStrom) - The
WinHandler::size
method now gets aSize
in display points. (#904 by @xStrom) - Standardized the type returned by the contexts'
text
methods. (#996 by @cmyr)
- The optional GTK feature for non-Linux platforms. (#611 by @pyroxymat)
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
toEvent::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
andmulti_selection
set. (#960 by @xStrom) - X11: Support mouse scrolling. (#961 by @jneem)
Painter
now properly repaints on data change inContainer
. (#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
andMouseButton::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)
- 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
andController
. (#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
andidentity
. (#782 by @futurepaul) - Fixed menu inconsistency across multiple windows in
multiwin
. (#926 by @kindlychung)
- Added rendering tests. (#784 by @fishrockz)
- Added docs generation testing for all features. (#942 by @xStrom)
- Replaced
#[macro_use]
with normaluse
. (#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
toWidgetState
(#969 by @cmyr) - Fixed test harness crashing on failure. (#984 by @xStrom)
- GTK: Refactored
Application
to use the new structure. (#892 by @xStrom)
- 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 :(