From 4fb5c37a35b76fc61d188814231d79cee2664ec1 Mon Sep 17 00:00:00 2001 From: elkowar <5300871+elkowar@users.noreply.github.com> Date: Sun, 22 May 2022 11:21:45 +0200 Subject: [PATCH] Add hint about width of progress (fixes #458) --- crates/eww/src/widgets/widget_definitions.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/eww/src/widgets/widget_definitions.rs b/crates/eww/src/widgets/widget_definitions.rs index dc6930d..f3e89e9 100644 --- a/crates/eww/src/widgets/widget_definitions.rs +++ b/crates/eww/src/widgets/widget_definitions.rs @@ -405,7 +405,7 @@ fn build_gtk_scale(bargs: &mut BuilderArgs) -> Result { const WIDGET_NAME_PROGRESS: &str = "progress"; /// @widget progress -/// @desc A progress bar +/// @desc A progress bar. HINT: for the `width` property to work, you may need to set the `min-width` of `progressbar > trough` in your css. fn build_gtk_progress(bargs: &mut BuilderArgs) -> Result { let gtk_widget = gtk::ProgressBar::new(); def_widget!(bargs, _g, gtk_widget, { @@ -418,6 +418,7 @@ fn build_gtk_progress(bargs: &mut BuilderArgs) -> Result { // @prop orientation - orientation of the progress bar. possible values: $orientation prop(orientation: as_string) { gtk_widget.set_orientation(parse_orientation(&orientation)?) }, }); + Ok(gtk_widget) }