Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,16 @@ because it turns other people's test suites red.

### Fixed

- **The window uses far less memory, and rebuilding a screen no longer adds
to it.** Every
quiet line on a screen - a subtitle, a caption, the count of bytes beside a
size, the line a folded section keeps, the message under a field - parsed
its own copy of the fonts, and parsed another each time the screen was
rebuilt and the line said something new. After visiting the four tabs the
window held about 290 MB and it now holds about 120 MB, and rebuilding a
screen no longer adds to it. Nothing on the screen looks different. The open
list of formats still does this when you type into its filter, and is next.

- **The `Several batches` screen no longer slows down the longer it is
used.** Every batch added, removed or copied, every format chosen and every
press of `Start from a preset` made each box on the screen report a change
Expand Down
4 changes: 3 additions & 1 deletion internal/guard/leftedge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ func TestTheActionBarSpeaksOnTheSameEdgeAsTheForm(t *testing.T) {
if status == nil {
t.Fatal("the bar is not naming the destination at rest, so this guard read the wrong tree")
}
at, found := absoluteOf(generate, status)
// Measured where its words are, which labelBox knows for a line drawn
// ink tight - the label itself stands one padding to the left of them.
at, found := labelBox(generate, status.Text)
if !found {
t.Fatal("the status line is not on the screen it was found in")
}
Expand Down
17 changes: 17 additions & 0 deletions internal/guard/spacingscale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,34 @@ func gapBelowField(t *testing.T, screen fyne.CanvasObject, above, below string)
//
// Found by the text on the label rather than by a position handed in, because
// a guard given coordinates would be a copy of the layout it is checking.
//
// A sentence drawn ink tight (parts.inkTight) is measured by the room it was
// given, not by the label. Since 2026-09-23 the layout places the label one
// inner padding up and left and one larger on every side, so its padding falls
// outside the room and its words land on the room's edge - the label's own
// box is where its padding is, and the room is where the ink is, exactly
// where the label stood when a theme override took the padding off instead.
func labelBox(screen fyne.CanvasObject, words string) (band, bool) {
found := band{}
ok := false
tight := map[fyne.CanvasObject]band{}
atAbsolute(screen, func(o fyne.CanvasObject, at fyne.Position) {
if ok {
return
}
if room, is := o.(*fyne.Container); is && len(room.Objects) == 1 {
if p := room.Objects[0].Position(); p.X < 0 && p.X == p.Y {
tight[room.Objects[0]] = band{X: at.X, Y: at.Y, Width: room.Size().Width, Height: room.Size().Height}
}
}
shown, is := wordsOf(o)
if !is || shown != words {
return
}
if room, drawnTight := tight[o]; drawnTight {
found, ok = room, true
return
}
found, ok = band{X: at.X, Y: at.Y, Width: o.Size().Width, Height: o.Size().Height}, true
})
return found, ok
Expand Down
2,078 changes: 911 additions & 1,167 deletions internal/guard/testdata/screens/about.xml

Large diffs are not rendered by default.

Loading
Loading