The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Bump MSRV to 1.96.0 (#705)
- Fix upload of RGBA text sprites (i.e. Emojis) in kas_wgpu (#651)
- Fix docs.rs build for kas-soft (#652)
- Let Backspace key delete one grapheme cluster (#652)
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.
- 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)
- 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)
- 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)
- 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)
- 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)
- Add parameter
modalto fnEventCx::add_window(#565) - Prefer
PresentMode::Mailbox(#584) - Revise
SolveCacheAPI (#588) - Revise
kas::runner::{Runner, *Builder, *Theme}(#622)
- New trait
ReadMessageimpl'd byMessageStack(#565)
- Pass
SizeCxby&mut(#581) - Let
SizeCxderef mut toEventState(#581) - Rename
SizeRules::solve_seq->solve_widthsand publicly 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)
- 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 parametercolorsto fntext_with_effects(#636) - Rename fns
DrawCx::text_pos->text_with_position,text_selected->text_with_selection(#636)
- 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)
- 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 parameter
max_linesto fnmeasure_height(#590) - Multiple font selection improvements in
kas-textbackend
- 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)
- Add
kas-softsoftware-rendering backend (#610) - Gamma-correct text rendering for
kas-wgpu(#618) - Sub-pixel rendering for
kas-soft(#620)
- 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)
- 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)
- 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)
- Add fn
EventCx::add_dataless_window, similar to fnadd_windowbut without requiring aDatatype parameter (#560) - Add fn
Window::set_modal_with_parentto support modal windows at the API level (mostly unimplemented) (#560)
- Support sending all messages of a specific type to a pre-set widget (#557)
- Support sending messages to a widget from another window (#557)
- Let fns
EditBox::set_strandset_stringupdate the content size and scroll bar (#559) - Add fn
EditBox::guard_mut(#559) - Add fn
dialog::MessageBox::displayto construct as a modal window (#560) - Add dialogs
AlertUnsavedandAlertErroralong with result types (#561)
A major new feature is support for screen readers and similar accessibility tools via AccessKit. The result is reasonably functional, though does not yet support input (EditField) contents. Implementation in #521, #527; tracking issue is #509.
Other significant new features:
- Support for Input Method Editors (IME) (#497)
- New
enum Role, returned by fnTile::role(#519, #526, #540). This allows the kind of widget introspection required by AccessKit without tying implementation details to AccessKit. - Add tooltips (#530)
- MSRV is now 1.88, using Edition 2024 (#514)
- Remove feature
min_spec(#458) - Replace
proc-macro-errorwithproc-macro-error2and add featurenightly-diagnostics(#459, #464) - Remove feature
recursive-layout-widgets(#476) - Remove feature
winit: it is a required dependency (#510)
- Add fn
AppData::suspendedto allow data saving on window closure (#477) - Support frame updates; add fn
EventState::request_frame_timer(#482) - Delay construction of
wgpu::Device, allowing destruction when a window is suspended (#496) - Tweak
kas::runner::{Runner, Builder}; replace traitGraphicsBuilderwithGraphicsInstance(#496) - Support pop-up alignment (besides top-left) (#530)
- Improve initial window sizing on (at least) Wayland (#535)
- Remove class traits
HasBool,HasStr,HasString. Functionality is retained using inherent methods on widgets. (#474) - Remove trait
HasScrollBars; move enumScrollBarModetokas-widgetsand revise (#475) - Remove trait
LayoutVisitor, replacing with traitMacroDefinedLayout(#479) Idcan now de-duplicate multiple allocated variants constructed independently (#510)- Revise
Idconversions to/fromu64(#510, #519) - Add
LinearandAffinetransforms (#515) - Remove
Action::RECONFIGURE(#518) - Implement
PartialOrdforCoord,Size,Offset,Vec2andDVec, replacing fnslt,le,geandgt(#533) - Make
Coordcomparable toVec2andDVec2usingPartialOrdandPartialEq(#533) - Add
fn clamptoVec2,DVec2(#533) - Replace fn
Scrollable::scroll_axeswithcontent_size(#535)
- Add trait
ConfigFactory, allowing configuration of the configuration source (#496) - Automatically determine read/write mode when
KAS_CONFIGis used to specify a config path (#496) - Temporarily remove read/write support for font configuration (#500)
- Merge fns
DrawCx::text_effectsandtext(#458) - Remove fn
DrawCx::recurse(#467) - Implement
Layoutforkas::theme::Text(#469) - Fix (work around) shader bug on Intel iGPU (#485)
- Use Swash to raster glyphs, dropping support for
fontdue(#498, #501, #503) - Hide parts of
kas_textfromkas::text(#498) - Use
fontiqueto source system fonts, matching by script (#499, #500) - Remove fn
SizeCx::line_height; this is unfortunately no longer easy to calculate (#500) - Remove support for HarfBuzz, limiting shaping to Rustybuzz or kerning-only (#501)
- Support batched glyph rastering (#502)
- Support drawing offset text (#548, #551)
- Rename fn
EventCx::try_observe→try_peek(#472) - Rename fns
push_async,push_async_erased,push_spawntosend_*(#487) - Handle
Command::Exit(Ctrl+Q) andCommand::Close(Alt+F4) (#477) - Add
TimerHandle(replacespayload: u64) (#480) - Add fns
ScrollDelta::is_vertical,is_horizontal,as_offset,as_factor(#491) - Add click-click-drag gesture (mouse emulation of two-finger scale & rotate) (#492)
- Revise kinetic scrolling; standardized press velocity sampling (#494, #520)
- Remove fn
EventCx::send_command(redundant withEventState::send) (#516) - Rename enum variant
Event::MouseHover→MouseOver(#530) - Close pop-ups not a parent of a click and do not send
Event::PressStartto pop-ups first (#530) - Allow widgets not a descendant of an open pop-up to respond to the mouse (#530)
- Add type
PressStartused by variantEvent::PressStart(#533) - Change type of
Event::PressMove'sdeltafield fromOffsettoVec2(#533) - Size-optimize
PressSource(from 16 to 8 bytes) (#533) - Use
HasIdin fnEventState::depress_with_key(#540) - Register access keys on widget draw (#542)
- Add fn
Window::escapable, supporting window-closure via Esc key (#550)
- Move
kas::messages::MessageStacktokas::runner(#516) - Support
kas::messages::ActivateinCheckBox,MarkButtonandRadioBox(#516) - Add
kas::messages::SetValueF64, supported bySliderandSpinBox(#516) - Add
kas::messages::SetValueString, supported byEditBox,EditFieldandSpinBox(#516) - Add
kas::messages::SetIndex, supported byComboBox,StackandTabStack(#516)
Widget construction is changed substantially with a new trait Tile and many small changes.
- Move
#[widget { derive=.. }]support to a new#[derive_widget]macro, revising (#460, #461, #507) - Replace
fn Layout::find_idwith fnsLayout::try_probe,Tile::probe(#462, #469, #473) - Remove
Deref,DerefMutimpls for any widget with its ownId(#465) - Add policy on method modification by
#[widget]macro (#467) - Add trait
Tile, split out fromLayout(#469) - Move fn
idtoTile(#470) - Hide all fields of
widget_core!()(#470) - Prefer to take
&mut EventStatethan return anActionin widget-modifying methods (#474, #475) - Let
#[widget]supportwidget_set_rect!macro, making implementation of fnrectoptional (#476) - Remove support for input data for layout-macro-generated widgets (#478)
- Move fn
recttoLayout; make fnsLayout::{draw, try_probe}take&self(#480) - Improve
WidgetHierarchydebugging (#481) - Replaces fns
for_child*withget_child*(#490) - Prefer usage of
#[impl_self]overimpl_scope!(#506) - Support
#[widget = expr]syntax for mapping a child widget's input data (#507) - New
#[collection]attribute for widgets usingCollection(#517) - Assume
Data = ()for widgets without children or event handling (#517) - Replace fn
Tile::num_childrenwithchild_indices; allow childindexto change (#518) - Add argument
indexto fnTile::translation(per-child offset) (#520) - Replace const
Events::NAVIGABLEwith fnTile::navigable(#523) - Add widget
Page(#540)
- Replace traits
SharedData,ListData,MatrixDatawithDataClerk(#487, #493, #545, #546, #549) - Remove fn
Driver::on_messages(#493) - Replace widget
FilterBoxListwithFilterBoxListView, removingFilterList(#487) - Add
MatrixIndex(#493) - Add fns
Driver::navigable,labelto control navigability and optional label of view widgets (#529) - Resize view widgets when any content is too large for the view widget size (#534)
- Let fn
DataClerk::lenreturn enumDataLen, supporting data of undefined length (#535, #546) - Add trait
DataGeneratorand structGeneratorClerk(#547)
column!,row!,list!,grid!,aligned_column!,aligned_row!,float!macros moved tokas-widgetsas by-example macros (#476)- Remove
button!macro (#476) - Add
kas-widgets::frame!by-example macro; add fnFrame::with_background(#476) - Add
kas-widgets::Floatwidget (#476) - Widget/layout macros now support
alignandpackas method calls (#476) - Remove support for access to layout-generated storage using
'namesyntax (#476) - Add fn
AdaptWidget::with_stateas constructor forAdapt(#476) - Revise trait
SliderValue, removingDurationsupport (#516) - Rename and revise trait
SpinnerValue→SpinValue, renamingSpinner→SpinBox(#516) - Let
SpinBoxsupport showing a unit after its value (#516) - Widgets
MarkandMarkButtonrequire a label on construction (#519) - New widget
SelectableLabel(#520) - Disable line wrapping in single-line
EditField(#520) - Add fn
AdaptWidget::with_hidden_label, widgetWithHiddenLabel(#529)
Most significant is the addition of the Collection trait representing a list or tuple of widgets.
- Bump MSRV to 1.80 (#457)
- Add struct
kas::config::Configto house event/theme/font config (#449) - Make
PRIMARYbackend default and fix transparency (#452) - Add
kas::decorationsmodule (#452) - Rename
Application→Runnerandkas::app→kas::runner(#456)
- Add
fn EventState::sendandsend_erasedto allow sending a message to any widget (#429) - Assume
Action::UPDATEfrom some handlers instead of requiring this explicitly (#432) - Remove event stealing and revise handling of disabled events (#453)
- Add trait
Collectionand macrokas::collection!(#431) - Add trait
CellCollectionand macrokas::cell_collection!(#443) - Replace trait
AutoLayoutwithLayoutVisitorusing RPITIT (#434) - Replace
align!(spec DSL, child),pack!(spec DSL, child)andmargins!(spec DSL, child)with.align(hints),.pack(hints),.margins(dirs, style)widget/layout adapters; more uniform support for adapters within and without layout macros (#438) - Pass
AlignHintstofn set_rectnotsize_rules(#447)
- Make
kas::widgets::ImageErrorpublic (#428) - Make
AdaptEventsa thin wrapper withoutId(#430) - Use RPITIT in traits
ListData,MatrixData(#433) - Remove widget aliases
StrLabel,StringLabel,StrText,StringText(#438)
- Add
kas-widgets::edit::InstantParseGuard(#427) - Fix doc builds for kas-widgets, kas-view, kas-resvg, kas-dylib (#427)
The focus of this version is input data: widgets now have a Data associated type, passed by reference
to event handlers and to a new update method. The key advantages of this change are:
- Declarative specification of trees with changeable widgets. For example, before this change a
countermust construct a label displaying the initial count and explicitly update this label when the count changes; now the displayed label is effectively a function of the count. - As a direct result of the above, it is no longer necessary for parent nodes to refer to children by name, thus it is no longer necessary to use structs with named fields (at least in the common cases).
- "View widgets" are now much more tightly integrated with other widgets, making the
SingleViewwidget redundant.
For more on input data, read the design document.
- New layout syntax:
row![a, b, c]instead ofrow: [a, b, c](#390) - Support debugging of
#[widget]macro viaKAS_DEBUG_WIDGET=WidgetName(#410)
- Merge
WidgetCoreintoLayout(#398) - Remove
Debugbound on widgets (#389) - Add
Event::is_reusable, removeWidget::handle_unused, callhandle_eventinstead but only for reusable events (#389) - Add new
trait Events: Sized, used to implementWidget(#391, #392)
- Add fns
Widget::_configure,_send,_replay,_nav_next,_broadcastas new dyn-safe API (#391, #392) - Implement
Widgetfor&mut TandBox<T>whereT: Widget + ?Sized(#392) - Add associated type
Widget::DataandEvents::Data(#395) - Add
Nodetype pairing a&mut dyn Widget<Data = A>with input data&A(#395, #396,#398) - Add
trait AppDatafor root-level shared data (#395, #396?) - Add
Events::update(#396) - Rename
Events::handle_message→Events::handle_messages(#396) - Rename
WidgetExt→LayoutExt(#398) - Replace
Events::pre_handle_eventwithEvents::mouse_hover(#401) - Remove
ConfigCx::restrict_recursion_to, replacing withEvents::configure_recurseandupdate_recurse(#405, #410) - Do not require configuration of hidden widgets (#405)
- Remove
Events::pre_configure; callEvents::configureandupdatebefore recursion (#410) - Add widget state tracking to catch invalid method call order (#410)
- Rename
Action::SET_SIZE→SET_RECT(#386) next_nav_focusis now always handled as a pending action (#386)- Add
Event::CursorMovefor motion without a grab press (#389) - Add
EventState::request_update(#386, #396) - Add
Action::EVENT_CONFIG,UPDATE; removeAction::EMPTY(#396) - Add
EventState::change_config(#396) - Replace
Event::ReceivedCharacterwithKeyover Winit's new keyboard-input API (#400, #404) - Revise
enum Command(#400) - Revise
enum Event: removeNone, change field style ofNavFocus(#401) - Rename
EventState::request_char_focus→request_key_focus(#404) - Add
enum FocusSource, used byEvent::NavFocus(#404) - Add
fn EventState::depress_with_key(#405) - Rename
enum Response→IsUsedand re-export{Used, Unused}(#406) - Send
Event::PressMoveimmediately instead of batching (#412) - Change behaviour when
Press::grabis used twice in a row (#412) - Replace
*cx |= actionwithEventState::action(id, action)(#413) - Apply
Action::RECONFIGUREandAction::UPDATEto sub-trees (#413) - Rename
EventState::request_updatetorequest_timerand removefirstparameter (#421)
- Use Winit's window suspend/resume cycle (#403)
- Adjust shell construction: replace custom constructors with
ShellBuilder; tweakWgpuBuilder(#416) - Use "logical pixel" window sizing on all platforms and improve initial window sizing (#417)
- Rename
Shell→Application(#422) - Remove usage of WGPU's "wgsl" feature (#425)
- Add
kas::messagesmodule (#385) - Add
Command::Debugto print widget hierarchy to log, temporarily activated via F8 (#389) - Remove
Windowtrait; renameRootWidget→Window(#393) - Rename
ConfigMgr,DrawMgr,EventMgr,SizeMgr→ConfigCx, ... (#399) - Support dragging and drag-resizing of windows via border (#400)
- Add
enum WindowCommand(#400) - Add
Popupwidget as root of all popups (#405) - Rename
AccelLabel/AccelString/... →AccessLabel/AccessString/... (#405) - Remove
dark-lightfrom being a default dependency (#411) - Rename
struct WidgetId→Id(#413) - Event config: adjust serialization formats and support TOML (#416)
- Change font size unit from
Point / EmtoPixel / Em(#419) - Rename
mod kas::class→classes(#424)
- Add
FrameStyle::None,FrameStyle::Tab(#399)
- Remove
MapMessageadapter (#389) Slider,Spinnernow have a default step size (#389)EditField: set selection on focus; change behaviour of left/right arrow keys given a selection without shift key pressed (#389)- Revise
EditGuardto use input data (#396) - Revise
EditFieldconstructors and providedEditGuardimplementations (#396) - Add widget
Adaptto store local data and handle messages (#396, #400) - Add fns
AdaptWidget::map,map_any,on_update,on_configure(#396, #397, #400) - Revise
Stack,TabStackwidget constructors; add aTabwidget (#399, #410) - Replace
TextButtonwithButton::label,label_msgconstructors (#399) - Add
Textwidget (?) - Add
ScrollTextwidget (#419) - Add
AdaptEventCx,AdaptConfigCx(#421, #423)
- Move fns
make_id,reconstruct_keyto traitDataKey(#389) - Move all of
kas::modeltokas-viewcrate and revise to use input data (#396, #421) - Revise filter-list (#397)
ListViewandMatrixViewno longer use a default (unconfigured) view-widget for sizing. They may now have an initial size of zero and grow. (#410)
- Fix animation of
RadioBox(#385) - Fix calling of
handle_scroll(#386) - Improved handling of pending actions (#386, #412, #413)
- Fix calls to prepare
EditFieldtext before setting bounds (#399) - Fix Mandlebrot example's
shader64feature (#400) - Fix drag-opening of a
ComboBox(#412) - Fix infinite loop in
ListView::_nav_nextandMatrixView::_nav_next(#421)
Alpha release; changelog omitted.
Canvasuses async rendering (#376)Svguses async rendering (#378)- Improved momentum scrolling (#381)
- Support primary buffer (middle-click clipboard) on Linux (#383)
- Add
EventMgr::push_async,push_spawn(#376) - Support transparent windows (#380)
- Support borderless windows and basic toolkit-drawn titlebar (#380)
- New
GrabMode::Click(#383) - Add
PressSource::is_secondary,is_tertiary(#383) - Add
EventMgr::get_primary,set_primary(#383)
- Move theme traits,
SimpleThemeandFlatThemeto kas-core (#374) - Move
ShadedThemeto kas-wgpu (#374) - Move
Shellto kas-core. AddWindowSurface,GraphicalShell,ShellAssoctraits for better abstraction of shell implementation. Addkas::shell::DefaultShell. (#375) - Rename
ToolkitProxy→Proxy,TkAction→Action(#375) Widget::handle_messageis now called on the widget submitting a message (#376)- Update to Winit 0.28, Wgpu 0.15, dark-light 1.0 (#379)
- Switch from window_clipboard to arboard + smithay-clipboard (#383)
- Cancel existing mouse grab when requesting a new one (#383)
- Change data structure of
Event::PressStart,PressMove,PressEnd(#383) - Replace
EventMgr::grab_presswithPress::grabbuilder pattern (#383)
- Translate pop-up menus inside scroll regions (#373)
- Use
PresentMode::Fifo, improving compatibility with older Intel graphics, at the cost of some hangs with multiple windows on X11 (#369) - Fix mouse highlighting for
Spinnerwidget (#369) - Show mnemonic (
AccelLabel) hints with Alt key when edit field has focus (#369)
Stabilise support for Generic Associated Types (GATs). This requires Rust 1.65.0,
removes the gat feature flag, revises the SharedData{,Mut}, ListData and
MatrixData traits. #357
- Forbid usage of non-
#[widget]fields in a widget'slayout(#356) - Rename
{Text,}Button::on_pushtoon_press(#356) - Adjust
Driver::setmethod; addDriver::set_mo(#357) impl_singleton!macro: remove impliedWidgetbound on fields usingimpl Traitsyntax, allow usage of_andimpl Traitwithin types (#359)- Rename
impl_singleton!tosingleton!, moving impl toimpl-tools-lib(#360) - Re-export macros from
kas{,_core}root instead ofmacrosmodule (#364) - Bump dependencies:
tiny-skiav0.8.2,resvgandusvgv0.28.0 (#362, #366) - Bump dependency:
wgpuv0.14 (#362)
- Fix tab navigation to loop when first result is
None(#356) - Fix input state for view widgets with changed data binding by fully resetting the widget (#365)
- Add
SingleDataMuttrait (#357) - Add
DrawMgr::draw_iface(#366) - Bump dependency:
impl-tools-libv0.7.0 (#357, #360, #366) - Bump dependencies:
env_loggerv0.10 (#366),kas-textv0.6.0 (#366) - New dependency:
maybe-ownedv0.3.4 - Move Clippy lint configuration to CI runner (#359)
- Adjust code formatting (#361)
With a year since the previous release, KAS v0.11 sees a lot of changes. In the interest of brevity, the list below is incomplete.
One of the major nuisances with KAS v0.10 and earlier was the that dyn Widget
was not a valid type since the associated Handler::Msg type must be specified.
KAS v0.11 removes this associated type (#309), replacing it with a variadic
message stack, thus making dyn Widget a valid (unsized) type.
- Add
fn WidgetCore::identify, returning a printable type (example result:TextButton#01) (#266) - New trait
WidgetExt: Widget(#286) - Add
Widget::handle_message; renameHandler::handle→handle_event(#309) - Merge
HandlerandWidgetConfigtraits intoWidget(#312) - Replace
#[widget_core] core: CoreDatafield withcore: widget_core!()(#314) - Remove bound
Widget: Any(and thus'static) (#316) Windowtrait simplified; newRootWidgetstruct handles pop-ups (#318)- Add
Widget::steal_event(#319) andWidget::pre_handle_event(#324) - Trait
Scrollable: Widgetis now a core trait; new traitHasScrollBars(#324)
This cycle saw the development of the #[autoimpl] and impl_scope! macros
which were split out into a new impl-tools crate in #300.
#[derive(Widget)]becomeswidget!(#258) becomes#[widget](#300)- Auto-detect which traits have manual impls (#258) and merge generated methods into manual impls (#312, #335)
impl Selfsyntax (#258, #300)- New
#[autoimpl]macro as a more capable version of#[derive](#258, #272, #293, #294) - Revise
make_widget!intoimpl_singleton!(#272, #317) - New
widget_index!macro (#291)
Widgets may now have complex internal layout, defined by a domain-specific macro language (#259, #282, #304, #306, #314, #316, #322, #345, #348, #350).
- Better text,
EditBoxmargins (#283) - Menu entries use interior margins (#283)
- Fix initial window size on Wayland (#298)
- New struct
PixmapScalingused byImageandSvg(#303, #321) - Add
floatlayout (#322) - Revise
FrameRules; addMarginStyle(#348) - Add alignment hints to
AxisInfo, removing fromset_rect(#350)
Partial (localised) widget configuration is now possible (#276, #299).
The WidgetId type is now a path (#264, #265).
As a result, WidgetId is no longer Copy but persistent identifiers for
view widgets over a specific content are possible (#282).
Further, it is possible to determine whether one widget is the ancestor of
another purely by comparing WidgetIds.
- Breaking:
Ord for WidgetIdnow considers a parent to come before its children - Add
WidgetChildren::make_child_id(#313, #330)
The widget trait revision (#309) introduced a variadic message stack
(EventMgr::push_msg and EventMgr::try_pop_msg methods), and allowed the
implementation of a generic EventMgr::send routing method replacing the
SendEvent trait, as well as removal of VoidMsg.
Momentum (flick) scrolling is now supported (#268).
- Rename
Manager→EventMgr,ManagerState→EventState(#266) - Disabled status is now a property of
EventState, not of the widget (#292, #323) Responseenum loses most variants; newScrollenum (#264, #309)- Add
Event::activate_on_press, replacing `EventMgr::handle_generic (#311) - Replace
kas::event::Event::Activatewithkas::event::Command::Activate(#323) - Replace
Manager::handle_genericwithWidget::pre_handle_event(#324) - Add
Event::MouseHover,Event::LostMouseHover,Event::LostNavFocus(#324) - New
ConfigMgrtype (introduced asSetRectMgrin #266, renamed in #330) - Add
EventMgr::next_nav_focus_from(#347)
Support animations, driven by the theme or the widget (#269, #270, #271, #321).
- New
SizeMgr,DrawMgrtypes wrapping theme size/draw interface (#266) - Rename
DrawHandle→ThemeDraw,SizeHandle→ThemeSize(#327) - Merge most methods of
SizeMgrinto newfeature,align_featuremethods over akas::theme::Featureenum (#327) - Add
SimpleThemeas base theme (#332) SizeMgr: add methodsdpem,min_scroll_size; removepixels_from_*(#334)- Clip text to widget rect (#336, #337)
- Auto-detect dark theme via
dark-lightcrate (#337) - Rename
SizeMgr::text_boundwithtext_rulesand revise (#338)
Visual tweaks include a "tick" mark for CheckBox (#298) and removal of "glow shadows" (#327).
Data changes are now notified via broadcast (#323), using a version number to check whether a view is current (#266, #289).
Driver trait impls are now also responsible for handling messages from view
widgets via the new Driver::on_message method (#334).
- New filters
ContainsString,ContainsCaseInsensitive(#248) - Add
SharedRcmethodsborrow,try_borrow,update_mut(#334) - Add
SharedDatatrait as common base of all data model traits (#334) - Rename
DefaultView→View,DefaultNav→NavView(#335) - New
kas_viewcrate for view widgets (#335)
- New widgets
Mark(#305, #316) andMarkButton(#319) - New widget
dialog::TextEdit(#318) - New widget
Spinner(#319, #334) - New widget
TabStack(#321) - Invisible scroll bars (#324)
- Renames:
CheckBox,CheckButton,RadioBox,RadioButton,RadioGroup(#330) CheckButtonandRadioButtoninfer layout direction from text direction (#332)- New
kas::widgets::editpublic module (#334) - Rename
DragHandle→GripPart(#339)
- The minimum supported Rust version (MSRV) is now 1.62.0 (#256, #335).
- Use (some) Clippy lints (#256)
#[must_use]annotations were added to methods returning a modification of self (#264, #266)- Use
easy-casttraits for conversions onkas::geomtypes (#284) - Handle window focus gain/loss (#292)
- Make
&EventStateavailable to (theme)DrawHandle(#292) - Do not panic when attempting to draw un-prepared text (#312)
- Merge example
filter-listintogallery(#323) - Remove
stack_dstdependency, which wasunsafeand used only as a premature optimisation (#335) - Update to WGPU 0.13 (#340) and winit to 0.27 (#351)
- Bump
easy-castdep (re-export askas::cast) to 0.5.0, addingcast_approxfunctionality (easy-cast#21)
This is a small patch:
- Fix button stretch and alignment, especially in the calculator example (#246)
- Fix loading the font DB before parsing Markdown (#246)
- Support
#[widget(align = stretch)](#246)
This release responds to three key criticisms of KAS: (1) slow compile times, (2) non-standard keyboard navigation, (3) ugly themes. While these issues are not fully solved, they are significantly improved. Additionally, the latest version of WGPU now gives us a working OpenGL backend.
The crate structure was significantly changed (#233):
- most of the old
kasmoved tokas-core - the new
kasis a wrapper around other crates, includingkas-core,kas-themeandkas-wgpu kas::widgetis renamed tokas::widgets- examples moved to
kas(top level) kas-dylibadded to support dynamic linking- Move
SvgandCanvaswidgets to newkas-resvgcrate (#240)
In response to issue #231, event handling (especially regarding Tab focus) changed to be more in line with traditional UIs:
- Esc does not clear focus; Enter is not required to gain text-input focus; Tab can navigate away from text-input focus (#234)
- Ctrl+C works on widgets with only selection focus
(e.g.
ScrollLabel) (#234) next_nav_focuswraps at end instead of clearing focus (#234)- Breaking:
EditGuard::focus_gainedcan no longer send a message (#234) - Tab cannot focus menus (#235)
- Restore nav focus after closing menus (#234)
- Click/touch events set nav focus (#234, #240)
- Clicking on a non-nav widget does not clear or set nav focus (#236)
- Fixes for menus (#235, 236)
- Partially fix Tab navigation of
ListViewwidget (#243) - Add move-distance threshold before switching from selection to panning mode
in
ListViewandMatrixView(#244)
The FlatTheme was reworked to have shadows (i.e. less "flat"), inspired by
some proposals by @hummingly:
- The gallery now defaults to
FlatTheme(#237) - Redesign buttons, check-/radio-boxes, and text-edit boxes (#237)
- Use borders to indicate navigation focus (#237)
- Revise colour schemes (#237, #244)
- Introduce shadow/glow effects for widgets; better shadows for menus (#239)
- Fix drawing of text inputs with disabled state (#244)
- Remove
read_onlystate ofManager(#234) - Update WGPU to 0.10.0, fixing OpenGL support (#241)
ReadandReadWriteconfig modes now tolerate missing files (#241)- Scale
Imageaccording to the scale factor (#241) - Update README regarding OpenGL and WGPU (#241)
- Use
proc-macro-errorcrate for macro error reporting (#242) - Support WGPU's API tracing (#242)
- Update README regarding lld and mold linkers with some benchmarks (#242)
- Enable text in SVGs using KAS's font config (#244)
- Make
InputStateabitflagsstruct (#244) - Apply scale factor to pan threshold (#244)
Add kas/macros_log feature, disabled by default.
Version 0.8 added image support without much thought to the API, leaving image
management methods in SizeHandle. Version 0.9 takes the opportunity to revise
the draw API, culminating in a new unified Draw trait and DrawIface
implementation accessible via DrawHandle::draw_device. This simplifies usage
of mid-level draw APIs, e.g. in themes and the clock example.
Also in this release is SVG support, a Canvas widget, image buttons, and
fixed sub-pixel positioning (clearer rendering for small text).
- Image loading split into allocate and upload steps, with immediate uploads avoiding the need for image storage in the graphics pipeline (#204)
- Image resource management moved into
kas::draw(#204) - Draw trait revision (#204, #206, #207, #221, #223, #224)
- Add unified draw interface,
DrawIface(#206, #221, #224) - Remove image management methods from
SizeHandle(#207) - Simplify
DrawHandle::size_handle; removeSizeHandle::draw_shared(#223) - Support custom button colours (#227)
- Add
kas::draw::color::Rgband some methods over colour types (#227)
- Move
DrawShadedtrait tokas-theme(#223) - Support large allocations in texture atlases (#212)
- Initial WGPU-over-OpenGL support and docs (#220)
- Apply draw offsets in vertex shaders; this reduces the maximum scroll offset to approx 2^24 pixels (#221)
- Make
kas_theme::dimmodule public, as helper for custom themes (#223) - Autogenerate colour variants for depressed/highlighted/disabled features (#227)
- Allow
derive(Widget)macro to forward impls to a field, allowing "thin wrappers" over widgets (#210) - Add
Svgwidget using the resvg library (#212) - More flexible margins for
Imagewidget (#212) - Add generic
Button, supporting images (#213, #227) - Add
Canvaswidget (#215) - Add
Gridwidget as alternative toderive(Widget)'s grid layout (#217) - Test and fix reversed
ListandListViewlists via a reverse-direction button indata-listexamples (#221) - Fix menu opening on mouse movement (#225)
- Tweak text underlines; use 10pt font by default (#213)
- Text-drawing optimisations (#215)
- Fix text scrolling in
EditBox/EditField(#221) - Fix sub-pixel positioning for text (#225)
- Fix clippy warnings (#208, #209, #214, #218)
- Add build artifacts (#219)
- Add
Directional::Reversedassoc. type andreversedmethod (#221) - Add
TryFormatwrapper for debugging over generic types (#227) - Support window icons (#228)
- Fix KAS-wgpu docs build (#205)
This release sees basic support for images, improved text rendering, replacements for all non-Rust dependencies, and theme configuration support.
- Support theme configuration (#196, #198)
- Support write-on-exit for updated configuration files (#196, #197)
- Revise colour types: replace
ColourwithRgbaandRgba8Srgb(#198)
- Use rustybuzz for text shaping, enabled by default (#199)
- Allow custom font aliases in config (#199)
- Allow assigning a custom font per text class; new
TextClass::MenuLabel, use (by default) serif fonts for edit fields (#200) - Vertically-align text lines (#201)
- Configuration for text rastering (#201)
- Support raster images loaded from the file-system (#185)
- Use dynamic image atlases (#186) created on demand (#187)
- Replace
wgpu_glyphandglyph_brushwith our own glyph caching (#190) - Add transparent shadows to pop-up layers (#194)
- Support
fontduefor glyph rastering (#201) - Move glyph raster code to KAS-text (#202)
Details:
- Use push constants (#184)
- Remove depth-buffer (#185)
- Use common bind group for graphics pipes (#187)
- Use a staging belt for vertex uploads (#189)
- Significant code revision (#184 - #190)
- Update
wgpu-rsto 0.8 (#193)
- Fix (or work-around) hang-on-exit with multiple windows open (#184)
- Better scrolling for widgets not receiving the initial event (#192)
- Avoid unnecessary redraws on mouse-movement while a mouse-grab is in effect (#196)
- Fix for spans in grids (landed in master in #184)
The major focus of this release is "view widgets": the ability to construct a synchronised view over shared data.
The new view widgets allow completion of the "CRUD" (Create, Read, Update,
Delete) 7GUIs challenge app. The use of
view widgets allows data-UI separation and scaling to larger data sets (mainly
limited by the O(n) filter in this example). Work also started on the Cells
challenge (mini-spreadsheet), though many details of the app and of the
MatrixView widget still need addressing, especially drawing, multi-cell
selection and keyboard handling.
Additionally, this version saw development of a new mini-library, kas::conv,
which spun off into its own lib easy-cast.
-
Use platform-specific shortcuts, especially for MacOS (#154)
-
Add support for reading and writing config files, controlled by env vars (#155)
-
Additional configuration items (#171):
- menu-open delay
- text selection via touch delay
- distance moved before touch events pan text
- when mouse click-and-drag can pan text and other objects
- Add
kas::conv::Convtrait and use to replace various casts (#152) - Add
CastandCastFloattraits (#154) - Switch to
easy-castlibrary and export askas::cast(#182)
- Add
filter-list(#146, #148, #149) - Simplify
sync-countervia use of a view widget (#146) - Add
async-eventdemonstrating "computation" in a background thread (#169) - Add
cursorsshowing a gallery of mouse cursors (#169) - Rename
dynamictodata-list(#176); adddata-list-view, a scalable (indirect data) variant (#170)
- Add a progress bar widget (#143)
- Replace
EditBoxVoid = EditBox<EditVoid>withEditBox = EditBox<()>(#146) - Frame widgets now implement
DerefandDerefMut(#147) - Add
ScrollBarswrapper andScrollabletrait (#149, #170) - Rename
WidgetChildrenmethods to be more distinctive (#157, #169) - Separate
EditBoxintoEditFieldwith frame wrapperEditBox(#158) - Move core widget traits into
kas::coreprivate module (#172) - Add
NavFramewrapper widget (#174) - Add
WidgetExtextension trait over anyWidget(#175) - Add
kas::adaptermodule (#175) - Add
kas::adapter::WithLabelandWidgetExt::with_label(#182) - Add
drawoptional parameter tolayoutattribute ofderive(Widget)macro (#182)
- Add
Accessor,SharedRcas an abstraction over shared data (#146); revise intoSingleData,ListData(#164); addupdatemethod (#170); more revision, addingSharedDataandSharedDataRec(#172); addUpdatableHandler(#176) - Add
FilterAccessorFilteredList(#148, #157, #164, #70)) - Add
ViewWidgettrait andDefaultViewfor view widgets (#146); revise intoViewwith associatedWidgettype (#170); renameViewtoDriverand addDefaultNav(#174); simplify and addDriver::Msg(#176) - Add
ListViewwidget (#146-148, #162-163) - Add
SingleViewwidget (#146) - Support item selection in
ListView(#162, #163, #167) - Support updating a data set through a view widget (#170)
- Support recursive updates of datasets (allowing
FilteredListto update when the underlying dataset updates) (#172) - Add
MatrixView(#175, #176)
- Add
EditGuard::updateand pass&mut Managerto guards (#148) - Revise handlers:
TextButton,CheckBox,RadioBoxnow all optional closures to generate an optional message (#160) - Reduce redraws by explicitly specifying which widgets highlight on hover (#167)
- Remove payload from
Response::Unhandled(#170) - Add
u64payload toEvent::TimerUpdate(#171) - Revise
ComboBoxhandler (#171) - Add
Response::Select(#174) - Add
WidgetExt::map_msg,map_msg_discardandmap_responsefor convenient adjustment of widget messages (#175) - Support arrow-key and tab navigation for
ListViewandMatrixView(#177) - Replace
Layout::spatial_rangewithspatial_nav, allowing correct child navigation order forListViewandMatrixView(#177)
- Add
size_handlemanagerparameter toset_rect(#147, #150) - Generic support for space reservations (#147, #175)
- Add
FrameRulestype for consistent/simpler frame sizing; use inSizeHandle(#161) - New
text_marginproperty for themes (#161) - Scroll regions have a drawable margin (#162)
- Rename
StretchPolicytoStretchand revise entries (#173) - Add
SizeHandle::pixels_from_virtual,pixels_from_points,pixels_from_emconvenience methods (#175)
- Impl
Sub<Size> for CoordandMul<i32> for Coord(#148) - Use
i32instead ofu32forSize; addOffset(#152) - Add
set_componentmethod toSize,CoordandOffset(#162)
- Terminology: replace 'toolkit' with 'shell' (#144)
- Add
ScrollComponentabstraction (#148) - Make
TkActioninto a bitflags struct (from an enum) (#150) - Make grab handles use the "grab" cursor icon (#151)
- Direction types
Left, Right, Down, Upmoved into newkas::dirmodule (#154) - Push
derive(Widget)before its attributes (#164) - Move
ThemeActionandThemeApiintokas::draw(#172) - Allow calling
set_text_and_prepare,set_string_and_preparebefore UI is initialised (#176) - Update README and ROADMAP (#171, #174)
- Update MSRV to 1.52.0 (currently beta) (#179)
- Update dependencies:
winit,wgpu,wgpu_glyph,env_logger(#156) - Update dependencies:
kas-text,smallvec,bitflags,bytemuck(#180) - Replace
clipboarddependency withwindow_clipboard(#180) - Use const generics to clean up layout solver storage types (#182)
This release covers significant revisions to the KAS-text API along with initial support for rich text. It also includes several fixes and quality-of-life improvements.
- Updates for new KAS-text API (#126, #131-133)
- Fix drawing of edit cursor in right-hand margin (#122)
- Add
markdownexample (#125, #139) - Remove
LabelString; makeAccelStringimplementkas-text::parser::Parser(#126) - Support underline and strikethrough (#129, #133)
- New
SelectionHelperstruct to abstract over text-selection logic (#137)
- Update to wgpu v0.6 (#121)
- Use pre-compiled GLSL shaders; add simple opt-in build system. This removes
the dependency on
shaderc. (#124) - Fix shader precision (#128)
- Add draw performance metrics (#131)
Improve space allocation for grid spans (#134) Fix size of slider handle when slider is over-sized (#134) Remove the unwanted right-hand margin in the Mandlebrot example (#134)
- Update winit to 0.23 (#129)
- Add
Window::on_dropmethod returning a future which can be used to retrieve state from a dialog window on closure. This replaces window callbacks. (#130) - New
LostSelFocusevent to delay focus-clearing until another widget supporting selection receives focus (#137) - Use
LinearMapfor cleaner code in the event manager (#140) - Fix: avoid clearing
time_updates,handle_updatesandpendingfields of event manager during reconfigure (#140)
- Remove broken
CloneTohelper trait (#126) - Add
min_specfeature for optional usage ofmin_specialization. (#132) - Let parent widgets store identifier range for descendents, allowing O(1)
is_ancestor_ofcheck. (#132) - Use binary-search in
WidgetChildren::findandfind_mutforO(log n)performance. (#133) - Add builder-style methods to
ThemeandToolkit(#139) - Switch to US-English spellings in API (#141)
This release largely concerns text formatting, with the new kas-text library.
It also saw the addition of the CONTRIBUTING and ROADMAP documents and, as usual, several doc improvements.
This is a new library written for use with KAS and integrated from #110 onwards, supporting glyph shaping, bidirectional text and much better line-wrapping (faster, line metrics and direct support for coord/glyph-position translation). For more on this library, see kas-text.
- Initial integration (#110)
- Move
Aligntokas-textand re-export (#110) - Remove
CowString(#111) - Support shaping via HarfBuzz (#113)
- Add
PreparedTextExtextension trait (#116) - Initial (hacky) support for text effects (#119)
- Draw a real text edit marker (#106)
- Use
unicode-segmentationfor prev/next grapheme (#106) - Keyboard and mouse text navigation (#106, #113, #115, #119)
- Enable text selection (#108, #113, #118)
- Enable double-click and triple-click selection modes (#117)
- Draw text selection (#108, #110, #112)
- Support scrolling within
EditBox(#116, #118) - PageUp/Down distance depends on view size (#119)
- Widgets may now handle the Escape key (#118)
- Initial support for shortcuts (hard-coded) (#116)
ModifiersStateis no longer passed withEventControlbut accessed viaManager(#113)Managernow tracks double-clicks (and triple-, etc.)- Rename
event::NavKey→event::ControlKey(#106)
- Setting a string no longer automatically resizes the UI (#116)
- Separate inner and outer margins (#114, #115)
- Various style tweaks (#105, #114)
ShadedThemenow re-uses parts ofFlatTheme(#109)- New
DrawHandleExtextension trait (#108) - Add
DrawHandleExt::size_handleandManager::size_handle(#107, #108)
- Add
WidgetCore::with_disabled(#104) - Adjust
SliderTypetrait requirements (#105) Slider: round to nearest int instead of rounding down (#114)- Extend
ComboBoxAPI (#104)
- Update for Rust 1.45:
proc_macro_hygieneis obsolete (#113) - Revise class traits regarding text (#110, #111)
- Align type now has
Default,TL,BR,CentreandStretchvalues (#110) - Update
wgpu_glyphandfont-kitdependencies (#106, #110) - Force window size to be at least 1×1 to avoid crash (#109)
- Remove screenshots from package
- Document main breaking changes below
Another fairly large release, with a lot of changes to input handling, a revision to the trait model, support for pop-up widgets, and (limited) support for stable rustc.
The most likely changes needed to update 0.3 → 0.4:
- Replace
Label::fromwithLabel::new - Replace
layout(horizontal)withlayout(row),layout(vertical)withlayout(column) - For several methods like
set_text, replacew.set_text(mgr, text)with*mgr |= w.set_text(text)
The Widget trait model has seen significant revision (#75, #74, #85):
WidgetChildrenadded (split out fromWidgetCore)WidgetConfigadded (taking all methods fromWidget)event::Handlersplit intoHandlerandSendEventWidgetis now just a trait bound over all others- All
Widgettraits are impl'd byderive(Widget)on an opt-out basis
Widgets should now return a TkAction from methods modifying self and not
take a Manager reference, if possible (#79).
Widgets can now be downcast with std::any::Any (#97).
Pop-up widgets are supported as a layer over an existing window (similar to a
borderless window, but without requiring windowing support, which winit lacks).
These are used for ComboBox and for (recursive) menus.
Added in #76, #85, #87, #93.
- Add
EditGuardallowing user hooks onEditBoxupdates (#68) - Add pan grabs — two-finger resize/rotate (#70)
- Use standard events for timer and handle updates (#74)
- Add reverse key navigation with Shift+Tab (#77)
- Allow
Sliderto respond to arrow keys (#77) - Various small fixes (#73)
- Add error and disabled states (#84, #85)
- Merge
ActionandEvent(#85) - Allow
ScrollRegion(andMandlebrot) to respond to navigation keys without focus (#90) - Let widgets request
Focuswhen responding to events (#90) - Menu navigation with Tab key (#92) and arrows (#93, #97)
- Allow accelerator keys to be derived from labels (e.g. "&File"),
to use a separate layer for each pop-up,
to be visually indicated when Alt is held,
and to be activated with Alt held or
alt_bypassset (#100)
- Allow some wgpu state to be shared between windows (#69)
- Tracks for sliders and scrollbars (#76)
- Use floating-point types for mid-level draw API (#76)
- Add a depth buffer (#94)
- Fix: do not use
noperspectivein shaders (#99)
- Add
DragHandlecomponent (#71) - Add
Sliderwidget (#71) - Add
Framewidget (#72) - Add
ComboBoxwidget (#76, #85) - Add
Splitterwidget (#80) - Add
MenuBar,SubMenu(#86) - Add
MenuEntry,MenuToggle(#89)
- Calculate window size before creation (#69)
- Add (real) margins (#72, #79)
- Replace
HorizontalandVerticalwithRight,Left,Up,Down, allowing reversed layouts and better pop-up placement (#78) - Do not pass
SizeHandletoLayout::set_rect(#79) - Rewrite
SizeRules::solve_seqto respect previous widths/heights and only modify minimally for validity (#79) - Reduce calls to
Layout::size_rules(#79)
- Move
Vec2tokas::geom; addDVec2(#70) - Add
CowStringandCowStringLas aliases overstdtypes (#74) - Add
preludemodule (#75, #102) - Let
TkActionsupportAdd<Output = Self>andManagersupportAddAssign<TkAction>(#79) - Update to wgpu 0.5, font-kit 0.6 and smallvec 1.4 (#94)
- Support stable rustc, for a few examples only (#101)
- New
unsizefeature flag (#101) - Revise documentation (#102)
Bump version of kas-wgpu to fix build on docs.rs.
This is a decent sized release, focussing primarily on drawing, themes and
layouts. Highlights include a new FlatTheme, many small visual improvements,
access to medium-level and low-level drawing APIs for custom widgets,
window size limits, and switchable themes and colour schemes.
- Readme for examples (#61, #62)
- Clock example now draws an analogue clock face (#63)
- New Mandlebrot example with a custom draw pipe (#64)
- Update
winitto 0.21 (#51)
- Add
ThemeApi,ThemeActionfor run-time adjustment (#53) Layout::drawmethods now receive&ManagerState, not&Manager(#57)- Replace
WidgetCore::find_coord_mutwithLayout::find_id(#51)
- Tweak margins; buttons now (temporarily) have an external margin (#53)
- Allow parents to influence child alignment (#52)
- Non-parent widgets may now have frames (#52)
layout_datais no longer required forsinglelayout (#52)- Add
StretchPolicytoSizeRules; adjustAxisInfo(#52) - Move
Align,Directionand friends tokas::data;Directionis now an enum (#52)
- Allow setting a custom cursor for a mouse grab (#54)
- Removal of
kas::event::Address: all events are now addressed byWidgetId(#51) - Update handles gained a
u64payload (#51) PressEndno longer sent without a press grab (#51)
- Support substitution of generics in handler impls (#51)
- New
Fillerwidget (#52) - New
RadioBoxwidget (#51) - Add
CheckBoxBare(#51)
- Support custom draw pipes (#64, #65)
- New
FlatRoundpipe (#53) - Use multisampling in
FlatRoundandShadedRoundpipes (#53) - Move
Draw* traits tokas::draw(#58, #60) Draw: addrect,framemethods; removedraw_quad(#50)- New
DrawRounded,DrawShadedtraits (#50, #60) rounded_framemethod supportsinner_radius(#58)- Use higher-level API in
DrawText(#58, #63)
- New
kas-themecrate, encapsulating content fromkasandkas-wgpu(#60, #57) - New
FlatTheme(#53) - Prettier navigation highlights and (some) frames (#58)
- New
MultiThemefor run-time switching (#53) - Add
stack_dstfeature,ThemeDsttrait; use forMultiTheme(#54, #61) - Experimental, feature-gated use of Generic Associated Types to avoid
unsafeusage (#57, #61) - Add
DrawHandle::draw_deviceto get lower-level draw API (#63) - Add
Theme::update_windowmethod (#53) - Remove
Theme::light_direction,get_fontsmethods; addinit(#63) - New
ThemeColoursstruct; colour themes (#53) - New
Dimensionsstruct and friends forTheme::Windowimpl (#53) - Themes now use integer arithmetic internally (#50)
- Read
KAS_BACKENDS,KAS_POWER_PREFERENCEenv vars (#50) - Additional parameters to
Toolkit::new_custom(#50, )
- Continuous Integration via Travis (#61)
kas::geom: addCoord::uniform,Rect::shrink(#50)- Window sizes may now have upper/lower limits (#51)
- New
sync-counterexample (#46)
- Add a
ScrollBarwidget; add scroll bars toScrollRegion - Re-added separate
Layouttrait (#42) - Widget configure now happens on init and may run user-defined code (#36)
- Widgets can now directly schedule updates on timer (#42)
- Widgets updates can now be triggered via an
UpdateHandle(#46) - Rename
WidgetCore::get_by_id→findand addfind_mut(#42) - Add
WidgetCore::find_coord_mut(#47)
Managerrenamed toManagerState; newManagerwrapper type added (#39)- Event handlers take a
&mut Managerparameter instead of&mut dyn TkWindow(#39) Manager::set_char_focusrenamed torequest_char_focus- Remove
Event::Identify(#47) - Several fixes for subtle event-handling issues
make_widget!macro now uses attributes instead oflayout => Msgparameter (#42)- Support generics within
make_widget!macro (#46)
- Add
kas::WindowIdtype - Add
TkAction::RegionMovedto updateManagerStateafter scroll region move (#47)
- Use
logcrate for logging; improved log messages - Use
shadercto compile shaders - Use
smallvecfor some optimisations - Update to
winitversion 0.20.0 (from pre-release version)
- Support creation of new windows from event handlers (#34)
- Add
ToolkitProxy, allowing some control from other threads (#36) - Add
kas_wgpu::sharedprivate module - Rename
eventmodule toevent_loop; refactor code (#36, #42, #46)
- Add install/testing section to README
kas_wgpu::Toolkit::newnow returns aResult- Optimise drawing and event handling for long list widgets
- Rename "dynamic" widgets to
List,BoxList,Row, etc. and extend API
This is a massive release in terms of the number of changes since 0.0.2. Most parts of the project have seen revision (perhaps least of all the macros). To summarise:
kas-gtkhas been replaced withkas-rgxwhich was then replaced withkas-wgpu.- Drawing and theming traits have been introduced in preliminary form.
- Event handling has changed significantly.
Classhas been removed, allowing fully custom widget types.
- Add trait references to
Classenum as alternative to widget downcast - Generalise callbacks: new module, additional
Conditioncodes - Replace
event::ignorewitherr_unhandleranderr_numfns - Add
Text::new()andEntry::new_on_activate(text, handler)
- Tweak
make_widgetsyntax tocontainer(vertical) => ... - Move macro doc to main crate and improve examples
- Allow
kascrate self reference to simplify proc macros and allow in doc tests
The initial release.