feat: add placeholder property to input widget
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user