Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
leaanthony committed Nov 30, 2024
1 parent 2ece458 commit ac210d9
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 168 deletions.
16 changes: 15 additions & 1 deletion v3/examples/window/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,20 @@ func main() {
Show()
windowCounter++
})
if runtime.GOOS == "darwin" {
myMenu.Add("New Panel Window").SetAccelerator("CmdOrCtrl+P").OnClick(func(ctx *application.Context) {
app.NewWebviewPanelWithOptions(application.WebviewPanelOptions{
Floating: true,
ShouldClose: nil,
KeyBindings: nil,
}).
SetTitle("PanelWindow "+strconv.Itoa(windowCounter)).
SetRelativePosition(rand.Intn(1000), rand.Intn(800)).
SetURL("https://wails.io").
Show()
windowCounter++
})
}
if runtime.GOOS != "linux" {
myMenu.Add("New WebviewWindow (Disable Minimise)").
OnClick(func(ctx *application.Context) {
Expand Down Expand Up @@ -496,7 +510,7 @@ func main() {
})
})
positionMenu.Add("Set Relative Position (Corner)").OnClick(func(ctx *application.Context) {
currentWindow(func(w *application.WebviewWindow) {
currentWindow(func(w application.Window) {
screen, _ := w.GetScreen()
w.SetRelativePosition(screen.WorkArea.Width-w.Width(), screen.WorkArea.Height-w.Height())
})
Expand Down
18 changes: 2 additions & 16 deletions v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ require (
github.com/google/go-cmp v0.6.0
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/google/uuid v1.4.0
github.com/goreleaser/nfpm/v2 v2.41.1
github.com/jackmordaunt/icns/v2 v2.2.7
github.com/jaypipes/ghw v0.12.0
github.com/leaanthony/clir v1.6.0
Expand All @@ -32,9 +33,9 @@ require (
github.com/tc-hib/winres v0.3.1
github.com/wailsapp/go-webview2 v1.0.18-0.20241130004144-dd8667af33c1
github.com/wailsapp/mimetype v1.4.1
golang.org/x/sys v0.27.0
golang.org/x/term v0.25.0
golang.org/x/tools v0.23.0
golang.org/x/sys v0.27.0
gopkg.in/yaml.v3 v3.0.1
modernc.org/sqlite v1.21.0
)
Expand All @@ -53,14 +54,10 @@ require (
github.com/ProtonMail/go-crypto v1.0.0 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/alecthomas/chroma/v2 v2.14.0 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/caarlos0/go-version v0.1.1 // indirect
github.com/cavaliergopher/cpio v1.0.1 // indirect
github.com/cloudflare/circl v1.3.8 // indirect
github.com/containerd/console v1.0.4 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/cyphar/filepath-securejoin v0.2.5 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dlclark/regexp2 v1.11.0 // indirect
Expand All @@ -79,11 +76,8 @@ require (
github.com/gookit/color v1.5.2 // indirect
github.com/goreleaser/chglog v0.6.1 // indirect
github.com/goreleaser/fileglob v1.3.0 // indirect
github.com/goreleaser/nfpm/v2 v2.41.1 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/invopop/jsonschema v0.12.0 // indirect
github.com/jaypipes/pcidb v1.0.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
Expand All @@ -94,35 +88,27 @@ require (
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/lithammer/fuzzysearch v1.1.5 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-zglob v0.0.6 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/mango v0.1.0 // indirect
github.com/muesli/mango-cobra v1.2.0 // indirect
github.com/muesli/mango-pflag v0.1.0 // indirect
github.com/muesli/roff v0.1.0 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/radovskyb/watcher v1.0.7 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rjeczalik/notify v0.9.3 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sajari/fuzzy v1.0.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
github.com/whilp/git-urls v1.0.0 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
Expand Down
Loading

0 comments on commit ac210d9

Please sign in to comment.