Skip to content

show or hide title bar. hide title bar,bind StartDragging function to Drag window.#57

Open
clong1995 wants to merge 12 commits intowebview:masterfrom
clong1995:master
Open

show or hide title bar. hide title bar,bind StartDragging function to Drag window.#57
clong1995 wants to merge 12 commits intowebview:masterfrom
clong1995:master

Conversation

@clong1995
Copy link

show or hide title bar

example: go:
w.SetTitleBar(false)

hide title bar,bind StartDragging function to Drag window.

example:
go:
_ = w.Bind("dragging", w.StartDragging)

html:
<div id="my_title_bar" style="width:100%; height:30px; background:red;"> My Dragging Title Bar</div>

js:
document.addEventListener("DOMContentLoaded", ()=>{ document.querySelector("#my_title_bar").addEventListener("mousemove", event => window.dragging()); });

huazhimeng and others added 12 commits September 9, 2024 15:01
      example:
      go: `w.SetTitleBar(false)`
【add】hide title bar,bind `StartDragging` function to Drag window.
      example:
      go: `_ = w.Bind("dragging", w.StartDragging)`

      example:
      html:`<div id="my_title_bar" style="width:100%; height:30px; background:red;"> My Dragging Title Bar</div>`
      js:`
          document.addEventListener("DOMContentLoaded", ()=>{
             document.querySelector("#my_title_bar").addEventListener("mousemove", event => window.dragging());
          });
       `
@pzx521521
Copy link

Does your code support macOS or Linux?if windows only, https://github.com/jchv/go-webview2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants