Skip to content

Commit af3a0b8

Browse files
committed
Adapt the book
1 parent 4515bac commit af3a0b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/src/g_object_properties.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Filename: <a class=file-link href="https://github.com/gtk-rs/gtk4-rs/blob/master
5555
{{#rustdoc_include ../listings/g_object_properties/3/custom_button/imp.rs:custom_button}}
5656
```
5757

58-
The implementation of `properties`, `set_property` and `property` is boilerplate that is the same for every GObject that generates its properties with the `Property` macro.
58+
The [`glib::derived_properties`](https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/attr.derived_properties.html) macro generates boilerplate that is the same for every GObject that generates its properties with the `Property` macro.
5959
In `constructed` we use our new property "number" by binding the "label" property to it.
6060
`bind_property` converts the integer value of "number" to the string of "label" on its own.
6161
Now we don't have to adapt the label in the "clicked" callback anymore.

0 commit comments

Comments
 (0)