Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ You can find its changes [documented below](#070---2021-01-01).
- Updated source code, tests and docs to use `Selector::with` instead of `Command::new` ([#1761] by [@arthmis])
- Updated docs of `should_propagate_to_hidden`, `children_changed` and `register_for_focus` ([#1861] by [@xarvic])
- Update docs of `RawLabel`: does not require `ArcStr`([#1886] by [@Maan2003])
- Fix `Controller` links for `Click` ([#2158] by [@yrns])

### Examples
- Add readme ([#1423] by [@JAicewizard])
Expand Down Expand Up @@ -840,6 +841,7 @@ Last release without a changelog :(
[#2145]: https://github.com/linebender/druid/pull/2145
[#2148]: https://github.com/linebender/druid/pull/2148
[#2151]: https://github.com/linebender/druid/pull/2151
[#2158]: https://github.com/linebender/druid/pull/2158

[Unreleased]: https://github.com/linebender/druid/compare/v0.7.0...master
[0.7.0]: https://github.com/linebender/druid/compare/v0.6.0...v0.7.0
Expand Down
7 changes: 4 additions & 3 deletions druid/src/widget/click.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

//! A clickable [`Controller`] widget.
//!
//! [`Controller`]: struct.Controller.html
//! [`Controller`]: trait.Controller.html

use crate::widget::Controller;
use crate::{Data, Env, Event, EventCtx, LifeCycle, LifeCycleCtx, MouseButton, Widget};
use tracing::{instrument, trace};

/// A clickable [`Controller`] widget. Pass this and a child widget to a
/// [`ControllerHost`] to make the child interactive. More conveniently, this is
/// available as an `on_click` method via [`WidgetExt`]'.
/// available as an [`on_click`] method via [`WidgetExt`].
///
/// This is an alternative to the standard [`Button`] widget, for when you want
/// to make an arbitrary widget clickable.
Expand All @@ -31,8 +31,9 @@ use tracing::{instrument, trace};
/// mouse down, which can be useful for painting based on `ctx.is_active()`
/// and `ctx.is_hot()`.
///
/// [`Controller`]: struct.Controller.html
/// [`Controller`]: trait.Controller.html
/// [`ControllerHost`]: struct.ControllerHost.html
/// [`on_click`]: ../trait.WidgetExt.html#method.on_click
/// [`WidgetExt`]: ../trait.WidgetExt.html
/// [`Button`]: struct.Button.html
/// [`LifeCycle::HotChanged`]: ../enum.LifeCycle.html#variant.HotChanged
Expand Down