mirror of
https://github.com/taigrr/crocgui
synced 2025-01-18 04:03:16 -08:00
42 lines
1.2 KiB
Go
42 lines
1.2 KiB
Go
package main
|
|
|
|
import (
|
|
_ "embed"
|
|
|
|
"fyne.io/fyne/v2"
|
|
"fyne.io/fyne/v2/app"
|
|
"fyne.io/fyne/v2/canvas"
|
|
"fyne.io/fyne/v2/container"
|
|
"fyne.io/fyne/v2/layout"
|
|
)
|
|
|
|
//go:embed metadata/en-US/images/featureGraphic.png
|
|
var textlogobytes []byte
|
|
|
|
func main() {
|
|
a := app.NewWithID("com.github.howeyc.crocgui")
|
|
w := a.NewWindow("croc")
|
|
|
|
a.Preferences().StringWithFallback("relay-address", "croc.schollz.com:9009")
|
|
a.Preferences().StringWithFallback("relay-password", "pass123")
|
|
a.Preferences().StringWithFallback("relay-ports", "9009,9010,9011,9012,9013")
|
|
a.Preferences().BoolWithFallback("disable-local", true)
|
|
a.Preferences().BoolWithFallback("force-local", false)
|
|
a.Preferences().BoolWithFallback("disable-multiplexing", false)
|
|
a.Preferences().BoolWithFallback("disable-compression", false)
|
|
|
|
textlogores := fyne.NewStaticResource("text-logo", textlogobytes)
|
|
textlogo := canvas.NewImageFromResource(textlogores)
|
|
textlogo.SetMinSize(fyne.NewSize(205, 100))
|
|
top := container.NewHBox(layout.NewSpacer(), textlogo, layout.NewSpacer())
|
|
w.SetContent(container.NewBorder(top, nil, nil, nil,
|
|
container.NewAppTabs(
|
|
sendTabItem(a, w),
|
|
recvTabItem(a),
|
|
settingsTabItem(a),
|
|
aboutTabItem(),
|
|
)))
|
|
w.Resize(fyne.NewSize(800, 600))
|
|
w.ShowAndRun()
|
|
}
|