Add support for "round-digits" property for scale widget (#509)
Co-authored-by: elkowar <5300871+elkowar@users.noreply.github.com>
This commit is contained in:
parent
0a5d6f4ac9
commit
7a3e2f4448
2 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,7 @@ All notable changes to eww will be listed here, starting at changes since versio
|
||||||
- Add `:onaccept` to input field, add `:onclick` to eventbox
|
- Add `:onaccept` to input field, add `:onclick` to eventbox
|
||||||
- Add `EWW_CMD`, `EWW_CONFIG_DIR`, `EWW_EXECUTABLE` magic variables
|
- Add `EWW_CMD`, `EWW_CONFIG_DIR`, `EWW_EXECUTABLE` magic variables
|
||||||
- Add `overlay` widget (By: viandoxdev)
|
- Add `overlay` widget (By: viandoxdev)
|
||||||
|
- Add `:round-digits` to scale widget (By: gavynriebau)
|
||||||
|
|
||||||
### Notable Internal changes
|
### Notable Internal changes
|
||||||
- Rework state management completely, now making local state and dynamic widget hierarchy changes possible.
|
- Rework state management completely, now making local state and dynamic widget hierarchy changes possible.
|
||||||
|
|
|
@ -394,6 +394,10 @@ fn build_gtk_scale(bargs: &mut BuilderArgs) -> Result<gtk::Scale> {
|
||||||
|
|
||||||
// @prop draw-value - draw the value of the property
|
// @prop draw-value - draw the value of the property
|
||||||
prop(draw_value: as_bool = false) { gtk_widget.set_draw_value(draw_value) },
|
prop(draw_value: as_bool = false) { gtk_widget.set_draw_value(draw_value) },
|
||||||
|
|
||||||
|
// @prop round-digits - Sets the number of decimals to round the value to when it changes
|
||||||
|
prop(round_digits: as_i32 = 0) { gtk_widget.set_round_digits(round_digits) }
|
||||||
|
|
||||||
});
|
});
|
||||||
Ok(gtk_widget)
|
Ok(gtk_widget)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue