Moved the code from src to the root.
This commit is contained in:
11
helper/helper.go
Normal file
11
helper/helper.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package helper
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/dialog"
|
||||
)
|
||||
|
||||
func FileDialogResize(fileDialog *dialog.FileDialog, w fyne.Window) {
|
||||
contentSize := w.Content().Size()
|
||||
fileDialog.Resize(fyne.Size{Width: contentSize.Width - 50, Height: contentSize.Height - 50})
|
||||
}
|
8
helper/path_separator.go
Normal file
8
helper/path_separator.go
Normal file
@@ -0,0 +1,8 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package helper
|
||||
|
||||
func PathSeparator() string {
|
||||
return "/"
|
||||
}
|
8
helper/path_separator_window.go
Normal file
8
helper/path_separator_window.go
Normal file
@@ -0,0 +1,8 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package helper
|
||||
|
||||
func PathSeparator() string {
|
||||
return "\\"
|
||||
}
|
12
helper/prepare_background_command.go
Normal file
12
helper/prepare_background_command.go
Normal file
@@ -0,0 +1,12 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package helper
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func PrepareBackgroundCommand(cmd *exec.Cmd) {
|
||||
|
||||
}
|
13
helper/prepare_background_command_windows.go
Normal file
13
helper/prepare_background_command_windows.go
Normal file
@@ -0,0 +1,13 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package helper
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func PrepareBackgroundCommand(cmd *exec.Cmd) {
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
|
||||
}
|
Reference in New Issue
Block a user