Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Sep 20, 2023
1 parent 0505a5b commit 2de6ee0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion internal/guibuilder/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ var (
},
"Max": {
func(c *fyne.Container, props map[string]string) fyne.Layout {
return layout.NewMaxLayout()
return layout.NewStackLayout()
},
nil,
nil,
Expand Down
2 changes: 1 addition & 1 deletion internal/guibuilder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func buildLibrary() fyne.CanvasObject {
}

func (b *Builder) buildUI(content fyne.CanvasObject) fyne.CanvasObject {
wrap := container.NewMax(b.wrapped)
wrap := container.NewStack(b.wrapped)

widType = widget.NewLabelWithStyle("(None Selected)", fyne.TextAlignCenter, fyne.TextStyle{Bold: true})
widName = widget.NewEntry()
Expand Down
2 changes: 1 addition & 1 deletion internal/guibuilder/widget.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ func initWidgets() {
"*fyne.Container": {
name: "Container",
create: func() fyne.CanvasObject {
return container.NewMax()
return container.NewStack()
},
edit: func(obj fyne.CanvasObject) []*widget.FormItem {
c := obj.(*fyne.Container)
Expand Down
6 changes: 3 additions & 3 deletions internal/guibuilder/wrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (o *overlayContainer) Resize(s fyne.Size) {
o.BaseWidget.Resize(s)
}

func (o *overlayContainer) Tapped(e *fyne.PointEvent) {
func (o *overlayContainer) Tapped(*fyne.PointEvent) {
setCurrent(o)
choose(o)
}
Expand Down Expand Up @@ -126,7 +126,7 @@ func (w *overlayWidget) Refresh() {
w.child.Refresh()
}

func (w *overlayWidget) Tapped(e *fyne.PointEvent) {
func (w *overlayWidget) Tapped(*fyne.PointEvent) {
setCurrent(w)
choose(w)
}
Expand Down Expand Up @@ -215,7 +215,7 @@ func wrapWidget(w fyne.Widget, parent *fyne.Container) fyne.CanvasObject {
}
o := &overlayWidget{child: w, parent: parent}
o.ExtendBaseWidget(o)
return container.NewMax(w, o)
return container.NewStack(w, o)
}

func wrapResource(r fyne.Resource) fyne.Resource {
Expand Down
2 changes: 1 addition & 1 deletion panels.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (d *defyne) makeEditorPanel() fyne.CanvasObject {
}, d.win)
}

return container.NewMax(d.fileTabs)
return container.NewStack(d.fileTabs)
}

func (d *defyne) makeFilesPanel() *xWidget.FileTree {
Expand Down
5 changes: 2 additions & 3 deletions text.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"io/ioutil"
"io"
"runtime"

"fyne.io/fyne/v2"
Expand Down Expand Up @@ -39,13 +39,12 @@ func newTextEditor(u fyne.URI, _ fyne.Window) editor {
text := &codeEntry{}
text.MultiLine = true
text.TextStyle.Monospace = true
text.Wrapping = fyne.TextTruncate
text.ExtendBaseWidget(text)
editor := &textEditor{uri: u, entry: text}
text.editor = editor

f, _ := storage.Reader(u)
b, _ := ioutil.ReadAll(f)
b, _ := io.ReadAll(f)
text.SetText(string(b))
_ = f.Close()

Expand Down

0 comments on commit 2de6ee0

Please sign in to comment.