feat: add placeholder property to input widget

This commit is contained in:
Byson94
2025-11-25 21:02:34 +05:30
parent b50f41b1e0
commit 6e9dca9d42
2 changed files with 5 additions and 0 deletions

View File

@@ -11,6 +11,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.
## [0.3.1] - 2025-11-01

View File

@@ -1818,6 +1818,10 @@ pub(super) fn build_gtk_input(
widget.set_text(&value);
}
if let Ok(value) = get_string_prop(&props, "placeholder", None) {
widget.set_placeholder_text(Some(&value));
}
let timeout = get_duration_prop(&props, "timeout", Some(Duration::from_millis(200)))?;
if let Ok(onchange) = get_string_prop(&props, "onchange", None) {