Skip to content

Commit

Permalink
windows icon, hide terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangasdf committed Oct 14, 2019
1 parent 792358a commit 48e6eae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ matrix:
env: DEPLOY_FILE=gocalcapp-mac.zip
- os: windows
script:
- go build -v
- go build -v -ldflags -H=windowsgui
- go get fyne.io/fyne/cmd/fyne
- fyne package -os windows -icon icon.png
- go build -v -ldflags -H=windowsgui # need to re-run under windows!
env: DEPLOY_FILE=gocalcapp.exe


Expand Down
1 change: 0 additions & 1 deletion calculator.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ func (s *InputField) walkHistory(diff int) {
}

func (s *InputField) TypedKey(key *fyne.KeyEvent) {
log.Println("key: " + key.Name)
switch key.Name {
case fyne.KeyReturn:
s.c.evaluate()
Expand Down
11 changes: 7 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
package main

import (
"fmt"
"bufio"
"io/ioutil"
"os"

"fyne.io/fyne"
"fyne.io/fyne/app"
"fyne.io/fyne/theme"
)

func main() {
fmt.Println("huhu")

app := app.New()
app.Settings().SetTheme(theme.LightTheme())
// app.SetIcon(icon.CalculatorBitmap)
iconFile, _ := os.Open("icon.png")
iconData, _ := ioutil.ReadAll(bufio.NewReader(iconFile))
app.SetIcon(fyne.NewStaticResource("icon", iconData))
Show(app)
app.Run()
}

0 comments on commit 48e6eae

Please sign in to comment.