Skip to content

Commit

Permalink
Add decorum data attr to window titlebar
Browse files Browse the repository at this point in the history
  • Loading branch information
hojberg committed Dec 11, 2024
1 parent cb8dff5 commit ea7a87d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Window.elm
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,15 @@ windowDraggability =
attribute "data-tauri-drag-region" "1"


{-| Normally, this would happen automatically, but when the Elm app mounts it
removes all previous HTML from <body> (where the Decorum plugin would normally
add a titlebar for Windows)
-}
windowControls : Attribute msg
windowControls =
attribute "data-tauri-decorum-tb" "1"



-- VIEW

Expand Down Expand Up @@ -418,6 +427,7 @@ viewWindowTitlebar id_ titlebar_ =
header
[ id (id_ ++ "_window-titlebar")
, windowDraggability
, windowControls
, class "window-control-bar window-titlebar"
, classList
[ ( "window-titlebar_transparent", transparent )
Expand Down

0 comments on commit ea7a87d

Please sign in to comment.