Skip to content

Commit

Permalink
fix(#12): drag window using title bar
Browse files Browse the repository at this point in the history
  • Loading branch information
vjousse committed Apr 30, 2024
1 parent 5b42139 commit 5a3a3d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src-elm/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ timerView model =

navView : Model -> Html Msg
navView model =
nav [ class "titlebar", attribute "data-tauri-drag-region" "" ]
nav [ class "titlebar" ]
[ div [ title "Settings", class "icon-wrapper", class "icon-wrapper--titlebar", class "icon-wrapper--single", onClick ToggleDrawer ]
[ div
[ class "menu-wrapper"
Expand All @@ -1072,7 +1072,7 @@ navView model =
, div [ class "menu-line" ] []
]
]
, h1 [ class "title" ] [ text "Pomodorolm" ]
, h1 [ class "title", attribute "data-tauri-drag-region" "" ] [ text "Pomodorolm" ]
, div [ class "icon-group" ]
[ div [ class "icon-wrapper icon-wrapper--titlebar icon-wrapper--double--left", style "padding-left" "18px", onClick MinimizeWindow ]
[ svg
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tauri-build = { version = "1.5.1", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.6.1", features = [ "fs-read-file", "system-tray", "shell-all", "icon-png", "devtools", "notification"] }
tauri = { version = "1.6.1", features = [ "window-start-dragging", "fs-read-file", "system-tray", "shell-all", "icon-png", "devtools", "notification"] }
image = { version = "0.25", features = ["png"] }
tempfile = "3.10.1"
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
Expand Down
11 changes: 5 additions & 6 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
},
"fs": {
"readFile": true,
"scope": [
"$RESOURCE/*"
]
"scope": ["$RESOURCE/*"]
},
"window": {
"startDragging": true
}
},
"systemTray": {
Expand Down Expand Up @@ -54,9 +55,7 @@
"providerShortName": null,
"signingIdentity": null
},
"resources": [
"audio/*"
],
"resources": ["audio/*"],
"shortDescription": "",
"targets": "all",
"windows": {
Expand Down

0 comments on commit 5a3a3d4

Please sign in to comment.