Added angle property for label widget (#209)

* Added angle property for label widget

* Update src/widgets/widget_definitions.rs

Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com>
This commit is contained in:
RedstoneWizard22 2021-07-15 13:07:06 +01:00 committed by GitHub
parent d8d67c2a0e
commit 4f59424e0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -501,6 +501,10 @@ fn build_gtk_label(bargs: &mut BuilderArgs) -> Result<gtk::Label> {
// @prop wrap - Wrap the text. This mainly makes sense if you set the width of this widget.
prop(wrap: as_bool) {
gtk_widget.set_line_wrap(wrap)
},
// @prop angle - the angle of rotation for the label (between 0 - 360)
prop(angle: as_f64 = 0) {
gtk_widget.set_angle(angle)
}
});
Ok(gtk_widget)