Rename selector::visible_bounds to delineate
This commit is contained in:
parent
611f89fc59
commit
afac7be7d1
4 changed files with 11 additions and 13 deletions
14
Cargo.lock
generated
14
Cargo.lock
generated
|
|
@ -1210,6 +1210,13 @@ version = "0.3.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376"
|
||||
|
||||
[[package]]
|
||||
name = "delineate"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"iced",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "deranged"
|
||||
version = "0.5.3"
|
||||
|
|
@ -6557,13 +6564,6 @@ version = "0.0.18"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1"
|
||||
|
||||
[[package]]
|
||||
name = "visible_bounds"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"iced",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "voronator"
|
||||
version = "0.2.1"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "visible_bounds"
|
||||
name = "delineate"
|
||||
version = "0.1.0"
|
||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||
edition = "2024"
|
||||
|
|
@ -41,10 +41,8 @@ impl Example {
|
|||
Task::none()
|
||||
}
|
||||
Message::Scrolled | Message::WindowResized => Task::batch(vec![
|
||||
selector::visible_bounds(OUTER_CONTAINER)
|
||||
.map(Message::OuterFound),
|
||||
selector::visible_bounds(INNER_CONTAINER)
|
||||
.map(Message::InnerFound),
|
||||
selector::delineate(OUTER_CONTAINER).map(Message::OuterFound),
|
||||
selector::delineate(INNER_CONTAINER).map(Message::InnerFound),
|
||||
]),
|
||||
Message::OuterFound(outer) => {
|
||||
self.outer_bounds = outer;
|
||||
|
|
@ -18,7 +18,7 @@ pub fn find_by_text(text: impl Into<String>) -> Task<Option<Text>> {
|
|||
}
|
||||
|
||||
/// Finds the visible bounds of the first [`Selector`] target.
|
||||
pub fn visible_bounds<S>(selector: S) -> Task<Option<Rectangle>>
|
||||
pub fn delineate<S>(selector: S) -> Task<Option<Rectangle>>
|
||||
where
|
||||
S: Selector + Send + 'static,
|
||||
S::Output: Bounded + Clone + Send + 'static,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue