Skip to content

Commit

Permalink
stop palette scroll to bubble up
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhou121 committed May 10, 2024
1 parent c604f51 commit 3f69ff4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ lapce-core = { path = "./lapce-core" }
lapce-rpc = { path = "./lapce-rpc" }
lapce-proxy = { path = "./lapce-proxy" }

floem-editor-core = { git = "https://github.com/lapce/floem", rev = "4c2266a9d4466194e17761b374a5f071f14a629e", features = ["serde"] }
floem-editor-core = { git = "https://github.com/lapce/floem", rev = "9a4c0fa6e1f8412b4a5eb73c8d7f3e0e7dcd9cbc", features = ["serde"] }
# floem-editor-core = { path = "../workspaces/floem/editor-core/", features = ["serde"] }

[patch.crates-io]
Expand Down
2 changes: 1 addition & 1 deletion lapce-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ zip = { version = "0.6.6", default-features = false, features = ["def
[dependencies.floem]
# path = "../../workspaces/floem"
git = "https://github.com/lapce/floem"
rev = "4c2266a9d4466194e17761b374a5f071f14a629e"
rev = "9a4c0fa6e1f8412b4a5eb73c8d7f3e0e7dcd9cbc"
default-features = true
features = ["editor", "serde", "default-image-formats", "rfd-async-std"]

Expand Down
6 changes: 5 additions & 1 deletion lapce-app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2504,7 +2504,11 @@ fn palette_content(
index.get() as f64 * palette_item_height,
))
})
.style(|s| s.width_full().min_height(0.0)),
.style(|s| {
s.width_full()
.min_height(0.0)
.set(PropagatePointerWheel, false)
}),
text("No matching results").style(move |s| {
s.display(if items.with(|items| items.is_empty()) {
Display::Flex
Expand Down
8 changes: 6 additions & 2 deletions lapce-app/src/editor/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use floem::{
ShowIndentGuide, SmartTab, VisibleWhitespaceColor, WrapProp,
},
empty, label,
scroll::{scroll, HideBar},
scroll::{scroll, HideBar, PropagatePointerWheel},
stack, svg, Decorators,
},
Renderer, View, ViewId,
Expand Down Expand Up @@ -1877,7 +1877,11 @@ fn editor_content(
rect
}
})
.style(|s| s.absolute().size_pct(100.0, 100.0))
.style(|s| {
s.absolute()
.size_pct(100.0, 100.0)
.set(PropagatePointerWheel, false)
})
}

fn search_editor_view(
Expand Down

0 comments on commit 3f69ff4

Please sign in to comment.