Skip to content

Commit

Permalink
✨ Now it can dragging by transparent window.
Browse files Browse the repository at this point in the history
  • Loading branch information
langyo committed Nov 24, 2023
1 parent 19a8dc3 commit a77448c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ default = []
devtools = []

[build-dependencies]
tauri-build = { version = "^1", features = [] }
tauri-build = "^1"

[dependencies]
anyhow = "^1"
chrono = "^0.4"
env_logger = "^0.10"
log = "^0.4"
tauri = "^1"
tauri = { version = "^1", features = ["window-start-dragging"] }
async-std = { version = "^1", features = ["attributes", "tokio1"] }
4 changes: 3 additions & 1 deletion packages/app/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
}
},
"allowlist": {
"all": false
"window": {
"startDragging": true
}
},
"windows": [
{
Expand Down
17 changes: 17 additions & 0 deletions packages/web/src/pages/portal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@ pub fn Portal() -> Html {

html! {
<>
<div
class={
css!(
r#"
width: 100%;
height: 48px;
background: blue;
position: fixed;
top: 0;
left: 0;
user-select: none;
z-index: 10000;
"#
)
}
data-tauri-drag-region={""}
/>
<TextInput
value={
(*(uri.clone())).clone()
Expand Down

0 comments on commit a77448c

Please sign in to comment.