• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

fyne-io / fyne / 30240283751

27 Jul 2026 05:37AM UTC coverage: 59.896% (-0.02%) from 59.912%
30240283751

push

github

web-flow
Merge pull request #6440 from toaster/lint/trivial_checks

enable a couple of linter checks which only require trivial adjustments

589 of 969 new or added lines in 144 files covered. (60.78%)

14 existing lines in 10 files now uncovered.

27103 of 45250 relevant lines covered (59.9%)

815.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
/test/window.go
1
package test
2

3
import (
4
        "fyne.io/fyne/v2"
5
        "fyne.io/fyne/v2/driver/software"
6
)
7

8
type window struct {
9
        title              string
10
        fullScreen         bool
11
        fixedSize          bool
12
        focused            bool
13
        onClosed           func()
14
        onCloseIntercepted func()
15

16
        canvas software.WindowlessCanvas
17
        driver *driver
18
        menu   *fyne.MainMenu
19
}
20

21
// NewWindow creates and registers a new window for test purposes
22
func NewWindow(content fyne.CanvasObject) fyne.Window {
×
23
        window := fyne.CurrentApp().NewWindow("")
×
24
        window.SetContent(content)
×
25
        return window
×
26
}
×
27

28
func (w *window) Canvas() fyne.Canvas {
252✔
29
        return w.canvas
252✔
30
}
252✔
31

NEW
32
func (*window) CenterOnScreen() {
×
33
        // no-op
×
34
}
×
35

NEW
36
func (*window) Clipboard() fyne.Clipboard {
×
37
        return NewClipboard()
×
38
}
×
39

40
func (w *window) Close() {
×
41
        if w.onClosed != nil {
×
42
                w.onClosed()
×
43
        }
×
44
        w.focused = false
×
45
        w.driver.removeWindow(w)
×
46
}
47

48
func (w *window) Content() fyne.CanvasObject {
2✔
49
        return w.Canvas().Content()
2✔
50
}
2✔
51

52
func (w *window) FixedSize() bool {
×
53
        return w.fixedSize
×
54
}
×
55

56
func (w *window) FullScreen() bool {
×
57
        return w.fullScreen
×
58
}
×
59

60
func (w *window) Hide() {
×
61
        w.focused = false
×
62
}
×
63

NEW
64
func (*window) Icon() fyne.Resource {
×
65
        return fyne.CurrentApp().Icon()
×
66
}
×
67

68
func (w *window) MainMenu() *fyne.MainMenu {
×
69
        return w.menu
×
70
}
×
71

72
func (w *window) Padded() bool {
×
73
        return w.canvas.Padded()
×
74
}
×
75

76
func (w *window) RequestFocus() {
×
77
        for _, win := range w.driver.AllWindows() {
×
78
                win.(*window).focused = false
×
79
        }
×
80

81
        w.focused = true
×
82
}
83

84
func (w *window) Resize(size fyne.Size) {
1✔
85
        w.canvas.Resize(size)
1✔
86
}
1✔
87

88
func (w *window) SetContent(obj fyne.CanvasObject) {
1✔
89
        w.Canvas().SetContent(obj)
1✔
90
}
1✔
91

92
func (w *window) SetFixedSize(fixed bool) {
×
93
        w.fixedSize = fixed
×
94
}
×
95

NEW
96
func (*window) SetIcon(_ fyne.Resource) {
×
97
        // no-op
×
98
}
×
99

100
func (w *window) SetFullScreen(fullScreen bool) {
×
101
        w.fullScreen = fullScreen
×
102
}
×
103

104
func (w *window) SetMainMenu(menu *fyne.MainMenu) {
×
105
        w.menu = menu
×
106
}
×
107

NEW
108
func (*window) SetMaster() {
×
109
        // no-op
×
110
}
×
111

112
func (w *window) SetOnClosed(closed func()) {
×
113
        w.onClosed = closed
×
114
}
×
115

116
func (w *window) SetCloseIntercept(callback func()) {
×
117
        w.onCloseIntercepted = callback
×
118
}
×
119

NEW
120
func (*window) SetOnDropped(func(fyne.Position, []fyne.URI)) {
×
121
}
×
122

123
func (w *window) SetPadded(padded bool) {
2✔
124
        w.canvas.SetPadded(padded)
2✔
125
}
2✔
126

127
func (w *window) SetTitle(title string) {
×
128
        w.title = title
×
129
}
×
130

131
func (w *window) Show() {
×
132
        w.RequestFocus()
×
133
}
×
134

135
func (w *window) ShowAndRun() {
×
136
        w.Show()
×
137
}
×
138

139
func (w *window) Title() string {
1✔
140
        return w.title
1✔
141
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc