From 489690f8bc45e75d78c31bca3d1ffc4e5cbb042e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C3=B6lfchen?= <115360611+W-lfchen@users.noreply.github.com> Date: Mon, 2 Sep 2024 11:10:35 +0200 Subject: [PATCH] docs: improve button and eventbox documentation Co-authored-by: Julian Schuler <31921487+julianschuler@users.noreply.github.com> --- crates/eww/src/widgets/widget_definitions.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/eww/src/widgets/widget_definitions.rs b/crates/eww/src/widgets/widget_definitions.rs index d9c2ec24..1b227ef8 100644 --- a/crates/eww/src/widgets/widget_definitions.rs +++ b/crates/eww/src/widgets/widget_definitions.rs @@ -518,7 +518,7 @@ fn build_gtk_input(bargs: &mut BuilderArgs) -> Result { const WIDGET_NAME_BUTTON: &str = "button"; /// @widget button -/// @desc A button +/// @desc A button containing any widget as it's child. Events are triggered on release. fn build_gtk_button(bargs: &mut BuilderArgs) -> Result { let gtk_widget = gtk::Button::new(); @@ -526,11 +526,11 @@ fn build_gtk_button(bargs: &mut BuilderArgs) -> Result { prop( // @prop timeout - timeout of the command. Default: "200ms" timeout: as_duration = Duration::from_millis(200), - // @prop onclick - a command that get's run when the button is clicked + // @prop onclick - command to run when the button is activated either by leftclicking or keyboard onclick: as_string = "", - // @prop onmiddleclick - a command that get's run when the button is middleclicked + // @prop onmiddleclick - command to run when the button is middleclicked onmiddleclick: as_string = "", - // @prop onrightclick - a command that get's run when the button is rightclicked + // @prop onrightclick - command to run when the button is rightclicked onrightclick: as_string = "" ) { // animate button upon right-/middleclick (if gtk theme supports it) @@ -934,11 +934,11 @@ fn build_gtk_event_box(bargs: &mut BuilderArgs) -> Result { prop( // @prop timeout - timeout of the command. Default: "200ms" timeout: as_duration = Duration::from_millis(200), - // @prop onclick - a command that get's run when the button is clicked + // @prop onclick - command to run when the widget is clicked onclick: as_string = "", - // @prop onmiddleclick - a command that get's run when the button is middleclicked + // @prop onmiddleclick - command to run when the widget is middleclicked onmiddleclick: as_string = "", - // @prop onrightclick - a command that get's run when the button is rightclicked + // @prop onrightclick - command to run when the widget is rightclicked onrightclick: as_string = "" ) { gtk_widget.add_events(gdk::EventMask::BUTTON_PRESS_MASK);