Releases: RibirX/Ribir
ribir-v0.4.0-alpha.14
Features
- macros: Added the
part_writer!
macro to generate a partial writer from a mutable reference of a writer. (#642 @M-Adoo)
Fixed
- core: Setting the theme before running the app results in the tree being constructed twice. (#637, @M-Adoo)
- core: Resolve a crash occurring in a class implementation with multiple children. (#637 @M-Adoo)
- core: Nodes created by a class implementation may not be disposed of when switching to another class. (#637 @M-Adoo)
- core: When merge multiple
MixBuiltin
widgets, there may be a premature dropping of the outerMixBuiltin
before it should occur. (#639 @M-Adoo) - core:
watch!
does not notify the initial value. (#640 @M-Adoo) - core: fix watch multi builtin events not work (#641 @wjian23)
- core: fix widget layout when h_algin and v_align are embedded in each other (#641 @wjian23)
- painter: fix elements may not be painted after window resize. (#644 @M-Adoo)
Breaking
ribir-v0.4.0-alpha.12
ribir-v0.4.0-alpha.11
ribir-v0.4.0-alpha.10
Features
- core: Added
WrapRender
for a render widget that combines with its child as a single widget tree node. (#626 @M-Adoo) - core: Added
StateWriter::into_render
to covert writer to reader if no other writer exist. (#626 @M-Adoo) - core: Added the built-in widget
Foreground
, enabling any widget to directly utilizeforeground
for configuring the painter brush. (#628, @M-Adoo) - painter: Distinguishes between fill and stroke brushes, allowing the painter to have two default brushes. (#628, @M-Adoo)
Changed
- core: Merged boolean status widgets into a single widget
MixFlags
, includingHasFocus
,MouseHover
andPointerPressed
. (#627 @M-Adoo) - core: Reimplemented
HAlignWidget
,VAlignWidget
,RelativeAnchor
,BoxDecoration
,ConstrainedBox
,IgnorePoint
,Opacity
,Padding
,TransformWidget
, andVisibilityRender
asWrapRender
. (#626 @M-Adoo)
Fixed
- core: The
SplitWriter
andMapWriter
of the render widget may not be flagged as dirty. (#626, @M-Adoo)
Breaking
ribir-v0.4.0-alpha.9
ribir-v0.4.0-alpha.8
Features
- core: The built-in widget
Class
has been added to enable the sharing of consistent styles across multiple elements and to allow widgets to have different actions and styles in different themes. (#624, @M-Adoo) - core: The widget
ConstrainedBox
has been added as a built-in widget; nowclamp
can be used as a built-in field. (#624 @M-Adoo) - core: Added
WindowFlags
to regulate the window behavior, with the option of utilizingWindowFlags::ANIMATIONS
to toggle animations on or off. (#624 @M-Adoo) - theme/material: Define the constant variables of motion. (#624, @M-Adoo)
- dev_helper: Refine the widget test macros. (#624, @M-Adoo)
Changed
Breaking
- widgets:
ConstrainedBox
has been relocated tocore
. (#624, @M-Adoo) - widgets: Utilize
Scrollbar
instead of bothHScrollbar
,VScrollbar
, andBothScrollbar
. (#624, @M-Adoo)
Fixed
ribir-v0.4.0-alpha.7
ribir-v0.3.0
We're thrilled to announce that Ribir now supports the Web platform! πππ
Experience the power of compiling Rust code to wasm and rendering it with WebGPU or WebGL.
Check out our Wordle game demo, now running smoothly in your browser!
Features
-
macros: Added a
include_crate_svg!
macro to include the svg relative to current crate. (#552, @M-Adoo) -
ribir: Added a
nightly
feature to enable functionalities that require nightly Rust. (#552, @M-Adoo)- The
include_crates_svg!
macro can operate without thenightly
feature. - The
include_svg!
macro requires thenightly
feature to be enabled.
- The
-
ribir: Introduced
AppRunGuard
to allow app and window configuration prior to app startup. (#565, @M-Adoo)
Previously, to configure the app and window before startup,App::run
couldn't be used:unsafe { AppCtx::set_app_theme(material::purple::light()); } App::new_window(root, None).set_title("Counter"); App::exec();
Now, with AppRunGuard, you can use
App::run
and chain the configuration methods:App::run(root) .with_app_theme(material::purple::light()) .with_title("Counter");
-
core: The split functions in
StateReader::map_reader
,StateWriter::map_writer
, andStateWriter::split_writer
no longer need to return a reference. (#568 @M-Adoo) -
core: Introduced
StateWatcher
for watching state modifies, which was previously the responsibility ofStateReader
. This results in a cleaner and more compactStateReader
implementation. (#556, @M-Adoo) -
gpu: Introduced
GPUBackendImpl::max_textures_per_draw
to set a limit on textures per draw phase (#562 @M-Adoo) -
gpu: Updated the
wgpu
implementation of the GPU backend to support WebGL. (#578, @M-Adoo) -
painter: Introduced support for
Resource<Path>
for drawing. This indicates that thePath
may be shared with others, allowing the backend to cache it. (#589 @M-Adoo) -
painter: Introduced support for bundled commands, enabling the backend to process these commands as a single entity and cache the resulting output. (#589 @M-Adoo)
Fixed
-
ribir: Resolved the issue causing a black screen on the first frame. (#566, @M-Adoo)
-
gpu: Retrieve the texture limit size from the GPU instead of using a hardcoded value. (#578, @M-Adoo)
-
ribir: fixed the crash issue when the shell window is zero-sized at startup. (#582, @M-Adoo)
Changed
-
core: Enhanced panic location tracking during widget build (#559 @M-Adoo)
-
core: rename builtin field of delay_drop_until to keep_alive (#561 @wjian23)
-
macros: polish the compile error message of invalid filed in
@$var {}
(#556 @M-Adoo) -
gpu: Removed dependency on the texture array feature of wgpu. (#562, @M-Adoo)
-
algo: removed
Resource
and renameShareResource
toResource
. (#564, @M-Adoo) -
dev-helper: Support specific the comparison of image tests. (#573 @M-Adoo)
-
dev-helper: If test images differ, both actual and difference images are saved with the expected image. (#573 @M-Adoo)
-
painter: Removed the AntiAliasing feature from the
painter
package, This responsibility now lies with the painter backend. (#584 @M-Adoo) -
gpu: The GPU backend no longer relies on MSAA, which is dependent on the graphics API. Instead, it uses the alpha atlas to provide a solution similar to SSAA.(#584, @M-Adoo)
-
gpu: The GPU backend now only caches the path command if it is a
Resource
. This change reduces GPU memory usage and accelerates cache detection. (#589 @M-Adoo) -
text: Implemented caching of the glyph path as a
Resource
to improve performance. (#589 @M-Adoo)
Documented
Breaking
-
ribir: Updated
App::new_window
to acceptWindowAttributes
instead of size as the second parameter. (#565, #566, @M-Adoo) -
ribir: The window creation APIs have been updated to use asynchronous methods, improving compatibility with browsers. (#565, @M-Adoo)
-
macros: removed
map_writer!
andsplit_writer!
macros. (#568, @M-Adoo) -
ribir:
StateWriter::map_writer
andStateWriter::split_writer
now only require a writer split function, enhancing both reader and writer split operations. (#568, @M-Adoo) -
core: The
StateReader
no longer supports watching its modifications. Use theStateWatcher
trait instead for this functionality. (#556 @M-Adoo) -
painter: Changes to
BackendPainter
APIs. This only affects you if you've implemented a custom painter. (#562 @M-Adoo)
ribir-v0.4.0-alpha.6
Features
-
core: Support for modifying the theme at runtime. (#618 @M-Adoo)
The code:
use ribir::prelude::*; let w = fn_widget! { @Text { on_tap: |e| { // Query the `Palette` of the application theme. let mut p = Palette::write_of(e); if p.brightness == Brightness::Light { p.brightness = Brightness::Dark; } else { p.brightness = Brightness::Light; } }, text : "Click me!" } }; App::run(w);
-
core: Added
Provider
widget to share data between sub-tree. (#618 @M-Adoo)Provider::new(Box::new(State::value(0i32))).with_child(fn_widget! { @SizedBox { size: Size::new(1.,1.), on_tap: |e| { // Access the provider in a callback. let mut v = Provider::write_of::<i32>(e).unwrap(); *v += 1; }, @Text { text: { // Access the provider in any descendants let v = Provider::of::<Stateful<i32>>(ctx!()); let v = v.unwrap().clone_writer(); pipe!($v.to_string()) } } } });
-
core: Added
Overlay::of
to allow querying the overlay in event callbacks. (#618 @M-Adoo) -
core: Added
WidgetCtx::query
,WidgetCtx::query_write
,WidgetCtx::query_of_widget
andWidgetCtx::query_write_of_widget
. (#618 @M-Adoo)
Breaking
- core: Removed
Overlay::new_with_handle
andOverlayCloseHandle
. (#618 @M-Adoo) - core:
GenWidget::gen_widget
no longer requires a&mut BuildCtx
parameter. (#616 @M-Adoo) - core: Removed
FullTheme
andInheritTheme
, now only usingTheme
. Any part of the theme, such asPalette
, can be directly used to overwrite its corresponding theme component. (#618 @M-Adoo)