5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-10 22:19:46 +08:00

[v3] Add smart context menu example

This commit is contained in:
Lea Anthony 2023-06-20 21:35:41 +10:00
parent 7f6151d573
commit 5f81a87912
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
2 changed files with 13 additions and 1 deletions

View File

@ -21,6 +21,18 @@
<input type="text" placeholder="context menu hidden here" style="--default-contextmenu: hide"/>
</label>
</div>
<div class="region" id="123abcgr">
<h1>Smart Context Menu shown here</h1>
<label>
<input type="text" placeholder="context menu shown here"/>
</label>
<br/>
<p style="user-select: text">Context menu shown here only if you select text</p>
<br/>
<label>
<textarea placeholder="context menu shown here"></textarea>
</label>
</div>
<div class="region" id="234abcs" style="--default-contextmenu: hide">
<h1>Default Context Menu hidden here</h1>
<label>

View File

@ -28,7 +28,7 @@ func main() {
mainWindow := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
Title: "Context Menu Demo",
Width: 1024,
Height: 800,
Height: 1124,
Mac: application.MacWindow{
Backdrop: application.MacBackdropTranslucent,
TitleBar: application.MacTitleBarHiddenInsetUnified,