Repository navigation
What's Changed
Significant additions include improved Input Method Editor (IME) support, font selection, font rendering (gamma correction and sub-pixel rendering support), several small input handling improvements, better resizing, a new text Editor component, revised image widgets Sprite and Image, a new kas-soft rendering backend and significantly revised view widget clerks.
Known issues: this release uses a pinned pre-release of winit which breaks AccessKit support.
Dependencies
- Bump MSRV to 1.92.0 (#621)
- Update winit to 0.31.0-beta.2 (pinned) (#583)
- Update wgpu to 28.0.0 (#584, #621)
- Update kas-text to 0.9.0 (#590, #599, #634, #646)
- Remove dark-light (#637)
Feature flags
- Flag
minimalno longer implieswgpu(#622) - Flag
default(ofkas) no longer impliesview,resvg,markdown,spawn,accesskit(#568) - Flag
image(ofkas-widgets,kas-core,kas) no longer automatically enables all available formats (#568) - Add flag
image-default-formattokas-wigdgetsto enable all formats (#568) - Add flags
avif,jpeg,png,webptokas-wigdgetsto enable individual formats (#568) - Kas enables its own flags
view,markdownandresvgas a dev-dependency (#568)
Configuration
- Support selection of font (generic) family, size and weight based on
TextClass(#618, #634) - Revise text raster config (#620)
- Add
double_click_dist_threshevent configuration (#623)
Macros
- Let
#[derive_widget]support overriding of moreTilemethods (#612) - Remove
widget_set_rect!macro (#613) - Remove
aligned_row!andaligned_column!(#630) - Support
row!andcolumn!withingrid!(#630)
Widget traits and lifecycle
- Add traits
WidgetCore,WidgetCoreRect(#613) - Add fns
Tile::{core, core_mut}whereSelf: Sized(#615) - Remove
Clonesupport for widgets (#613) - Replace trait
ScrollablewithViewport(#594, #597, #598) - Remove fns
Events::{configure_recurse, update_recurse} - Add fn
Events::recurse_indicesfor configure/update recursion control (#581) - Add fn
Events::post_configure(#581) - Add fn
Events::handle_resize(#589) - Move fn
probeto traitEvents(#563, #564) - Move fn
try_probeto traitTile(#567) - Enforce during configure that widget
Idis valid (#573) - Support non-rectangular hit-testing (#563)
- Validate that
#[layout]specifications only refer to known fields (#579) - Improved validation of paired method impls (#586)
Window management
- Add parameter
modalto fnEventCx::add_window(#565) - Prefer
PresentMode::Mailbox(#584) - Revise
SolveCacheAPI (#588) - Revise
kas::runner::{Runner, *Builder, *Theme}(#622)
Message handling
- New trait
ReadMessageimpl'd byMessageStack(#565)
Sizing functionality
- Pass
SizeCxby&mut(#581) - Let
SizeCxderef mut toEventState(#581) - Rename
SizeRules::solve_seq->solve_widthsand publically document (#614) - Support for prioritised rules-solving (#612)
- Let
SizeRulesmargins default to zero (remove constructor parameter) (#578) - Add fns
SizeRules::{with_margin, with_margins}(#578) - Add fn
SizeCx::logical(#578, #579) - Replace fn
AxisInfo::sub_otherwithmap_other(#581) - Do not stretch
Stretch::Nonewidgets inSizeRules::solve_widths(#578) - Do not allow larger-than-ideal size while any item has less-than-ideal size (#614)
- Do not allow items with
Stretchpriority lower than that of the highest item to be larger than their ideal size (#614)
Draw and theme functionality
- Add fns
DrawCx::{colors, draw_rounded}(#577) - Add fn
{Rgb, Rgba}::desaturate(#577) - Revise fns
DrawShared::image_*(#627, #639) - Remove
MultiThemeBuilder(#628) - Add
MarkStyle::{Plus, Minus}(#632) - Add fn
DrawCx::text_with_colorand paramtercolorsto fntext_with_effects(#636) - Rename fns
DrawCx::text_pos->text_with_position,text_selected->text_with_selection(#636)
Event handling
- Let
EventCximplDeref<Target = ConfigCx>(#599) - Revise component
TextInputwith support for touch taps (#605) - Add component
ClickInputAction(#597) - Rename variant
Event::CursorMove->PointerMove(#605) - Move fn
EventState::exittoEventCx(#570) - Add fn
idtoAdaptEventCx,AdaptConfigCx(#572) - Add fn
EventState::close_own_window(#588) - Remove some
Actionvariants (#588, #591) - Add
ActionMoved,ActionResize,ActionRedraw,ActionClose(#588, #589, #633) - Add
ConfigActionandWindowAction(#591)
Text processing
- Revise enum
TextClassto variantsStandard, Label, Small, Editor(#618) - Remove fns
ConfigCx::text_configure,SizeCx::text_rules(#636) - Remove
kas::text::Text(#636) kas::theme::Textnow supportsmutaccess to text object (#572)- Add paramameter
max_linesto fnmeasure_height(#590) - Multiple font selection improvements in
kas-textbackend
Text editing
- Revise input handling:
TextInputActioncomponent (#566) - Revise
SelectionHelperfns (#566) - Improved support for Input Method Editors (IME) (#583, #603, #605, #642)
- Full undo history for text editors (#641)
- Add
kas-widgets::edit::Editorcomponent (#643) - Call
EditGuard::updateonly without input focus (#643) - Revise when
EditGuard::{focus_gained, focus_lost}are called (#643) - Replace fn
Editor::set_error_statewithset_errorwith optional tooltip message (#644)
Rendering
- Add
kas-softsoftware-rendering backend (#610) - Gamma-correct text rendering for
kas-wgpu(#618) - Sub-pixel rendering for
kas-soft(#620)
Widgets
- Rename
ScrollRegion->ClipRegion(#595) - Replace
ScrollBarsandScrollBarRegionwithScrollRegion(#595) - Replace
format_data!andformat_value!withformat_text!andformat_label!(#618) - Add
Flowwidget (horizontal only) (#615) - Remove fn
Grid::edit(#589) - Revise
Textconstructors (#572) - Add parameter
inner: &mut WtoAdaptclosures - Rename fn
AdaptWidget::margins->with_margin_styleand support in macro layout syntax (#616) - Add fn
List::truncate(#575) - Add fn
AdaptWidget::with_stretch(#592) Stacknow only uses the active page to infer its minimum size (#590)
Image widgets
- Rename
kas-resvg->kas-image(#577) - Revise
kas-image::Scaling(#578) - Rename
kas-image::Image->Sprite, requiring explicit allocation and raster upload (#579, #627) - Add
kas-image::Imageas a high-level image widget (#579)
View widgets
- Reorganise: add
kas::view::clerkand move/rename multiplekas::viewitems (#574) - Remove
FilterBoxListViewwithout replacement (#574) - Remove struct
GeneratorClerk(#574) - Rename
kas::view::DataGenerator->kas::view::clerk::KeyedGenerator(#574) - Add
kas::view::clerk::IndexedGenerator(#574) - Split trait
DataClerkintoClerk,AsyncClerkandTokenClerk(#574) - Add
Clerk::mock_itemfor explicit control over sizing before data is available (#573) - Revise
Tab-key navigation forListViewandGridView(#596) - Add const
Driver::TAB_NAVIGABLE(#596)
New Contributors
Full Changelog: 0.16.1...0.17.0