feat: add transition_duration prop to stack widget

This commit is contained in:
Byson94
2025-11-26 20:18:28 +05:30
parent 8ec080a290
commit 6baa9c7858
2 changed files with 5 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- `gtk_ui` function for loading .ui files.
- `widget-control` (`wc` in short) command for controlling widgets.
- `placeholder` property to input widget.
- `transition_duration` property to stack widget.
## [0.3.1] - 2025-11-01

View File

@@ -1076,6 +1076,10 @@ pub(super) fn build_gtk_stack(
let transition = get_string_prop(&props, "transition", Some("crossfade"))?;
widget.set_transition_type(parse_stack_transition(&transition)?);
if let Ok(transition_dur) = get_i32_prop(&props, "transition_duration", None) {
widget.set_transition_duration(transition_dur as u32);
}
// let same_size = get_bool_prop(&props, "same_size", Some(false))?;
// widget.set_homogeneous(same_size);