Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 00b75f0

Browse files
committed
Feat: force light theme
1 parent b9aa66e commit 00b75f0

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ require (
1313
github.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe // indirect
1414
github.com/fyne-io/glfw-js v0.0.0-20220120001248-ee7290d23504 // indirect
1515
github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2 // indirect
16+
github.com/fyne-io/mobile v0.1.2 // indirect
1617
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 // indirect
1718
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20211213063430-748e38ca8aec // indirect
1819
github.com/godbus/dbus/v5 v5.1.0 // indirect

go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ github.com/fyne-io/glfw-js v0.0.0-20220120001248-ee7290d23504 h1:+31CdF/okdokeFN
8989
github.com/fyne-io/glfw-js v0.0.0-20220120001248-ee7290d23504/go.mod h1:gLRWYfYnMA9TONeppRSikMdXlHQ97xVsPojddUv3b/E=
9090
github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2 h1:hnLq+55b7Zh7/2IRzWCpiTcAvjv/P8ERF+N7+xXbZhk=
9191
github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2/go.mod h1:eO7W361vmlPOrykIg+Rsh1SZ3tQBaOsfzZhsIOb/Lm0=
92+
github.com/fyne-io/mobile v0.1.2 h1:0HaXDtOOwyOTn3Umi0uKVCOgJtfX73c6unC4U8i5VZU=
9293
github.com/fyne-io/mobile v0.1.2/go.mod h1:/kOrWrZB6sasLbEy2JIvr4arEzQTXBTZGb3Y96yWbHY=
9394
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
9495
github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7/go.mod h1:482civXOzJJCPzJ4ZOX/pwvXBWSnzD4OKMdH4ClKGbk=

main.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"os"
88

99
"fyne.io/fyne/v2/dialog"
10+
"fyne.io/fyne/v2/theme"
1011

1112
"fyne.io/fyne/v2"
1213
"fyne.io/fyne/v2/app"
@@ -36,6 +37,7 @@ func main() {
3637
}
3738

3839
app := app.New()
40+
app.Settings().SetTheme(theme.LightTheme())
3941
window := app.NewWindow("MCSManager Launcher")
4042
window.Resize(fyne.Size{Width: 320, Height: 260})
4143
window.SetFullScreen(false)
@@ -69,7 +71,11 @@ func main() {
6971
}
7072

7173
openBrowser := widget.NewButton("访问面板", func() {
72-
if err := utils.Open(fmt.Sprintf("http://localhost:%d/", webConfig.HttpPort)); err != nil {
74+
var port = 23333
75+
if webConfig.HttpPort > 0 {
76+
port = webConfig.HttpPort
77+
}
78+
if err := utils.Open(fmt.Sprintf("http://localhost:%d/", port)); err != nil {
7379
fmt.Printf("Open Browser err %v\n", err)
7480
}
7581
})

0 commit comments

Comments
 (0)