diff --git a/text/lru.go b/text/lru.go index 0b437d3c..78bdb54a 100644 --- a/text/lru.go +++ b/text/lru.go @@ -163,10 +163,6 @@ type layoutKey struct { lineHeightScale float32 } -type pathKey struct { - gidHash uint64 -} - const maxSize = 1000 func gidsEqual(a []glyphInfo, glyphs []Glyph) bool { diff --git a/widget/buffer.go b/widget/buffer.go index c67317a3..2a3961de 100644 --- a/widget/buffer.go +++ b/widget/buffer.go @@ -11,9 +11,6 @@ import ( // editBuffer implements a gap buffer for text editing. type editBuffer struct { - // pos is the byte position for Read and ReadRune. - pos int - // The gap start and end in bytes. gapstart, gapend int text []byte diff --git a/widget/decorations.go b/widget/decorations.go index 299fc415..86c974d3 100644 --- a/widget/decorations.go +++ b/widget/decorations.go @@ -4,7 +4,6 @@ import ( "fmt" "math/bits" - "gioui.org/gesture" "gioui.org/io/system" "gioui.org/layout" "gioui.org/op/clip" @@ -12,11 +11,7 @@ import ( // Decorations handles the states of window decorations. type Decorations struct { - clicks map[int]*Clickable - resize [8]struct { - gesture.Hover - gesture.Drag - } + clicks map[int]*Clickable maximized bool } diff --git a/widget/index.go b/widget/index.go index 62bf2f82..3d8fb3d2 100644 --- a/widget/index.go +++ b/widget/index.go @@ -347,10 +347,6 @@ type Region struct { Baseline int } -// region is identical to Region except that its coordinates are in document -// space instead of a widget coordinate space. -type region = Region - // locate returns highlight regions covering the glyphs that represent the runes in // [startRune,endRune). If the rects parameter is non-nil, locate will use it to // return results instead of allocating, provided that there is enough capacity. diff --git a/widget/label.go b/widget/label.go index 6f0e6b1d..8c375709 100644 --- a/widget/label.go +++ b/widget/label.go @@ -97,10 +97,6 @@ func (l Label) LayoutDetailed(gtx layout.Context, lt *text.Shaper, font font.Fon return dims, TextInfo{Truncated: it.truncated} } -func r2p(r clip.Rect) clip.Op { - return clip.Stroke{Path: r.Path(), Width: 1}.Op() -} - // textIterator computes the bounding box of and paints text. type textIterator struct { // viewport is the rectangle of document coordinates that the iterator is diff --git a/widget/selectable.go b/widget/selectable.go index 149cca8d..39380852 100644 --- a/widget/selectable.go +++ b/widget/selectable.go @@ -77,8 +77,6 @@ type Selectable struct { focused bool dragging bool dragger gesture.Drag - scroller gesture.Scroll - scrollOff image.Point clicker gesture.Click // events is the list of events not yet processed.