diff --git a/CHANGELOG.md b/CHANGELOG.md index b5eec37..f530f05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 `EWW_CMD`, `EWW_CONFIG_DIR`, `EWW_EXECUTABLE` magic variables - Add `overlay` widget (By: viandoxdev) +- Add `:round-digits` to scale widget (By: gavynriebau) ### Notable Internal changes - Rework state management completely, now making local state and dynamic widget hierarchy changes possible. diff --git a/crates/eww/src/widgets/widget_definitions.rs b/crates/eww/src/widgets/widget_definitions.rs index 474931a..d1be218 100644 --- a/crates/eww/src/widgets/widget_definitions.rs +++ b/crates/eww/src/widgets/widget_definitions.rs @@ -394,6 +394,10 @@ fn build_gtk_scale(bargs: &mut BuilderArgs) -> Result { // @prop draw-value - draw the value of the property 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) }