forked from joejulian/gio
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build !android
|
//go:build !android
|
||||||
// +build !android
|
|
||||||
|
|
||||||
package app
|
package app
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build darwin && ios && nometal
|
//go:build darwin && ios && nometal
|
||||||
// +build darwin,ios,nometal
|
|
||||||
|
|
||||||
package app
|
package app
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build darwin && !ios && nometal
|
//go:build darwin && !ios && nometal
|
||||||
// +build darwin,!ios,nometal
|
|
||||||
|
|
||||||
package app
|
package app
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build go1.18
|
//go:build go1.18
|
||||||
// +build go1.18
|
|
||||||
|
|
||||||
package app
|
package app
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build darwin && ios
|
//go:build darwin && ios
|
||||||
// +build darwin,ios
|
|
||||||
|
|
||||||
package app
|
package app
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build !nometal
|
//go:build !nometal
|
||||||
// +build !nometal
|
|
||||||
|
|
||||||
package app
|
package app
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build darwin && ios
|
//go:build darwin && ios
|
||||||
// +build darwin,ios
|
|
||||||
|
|
||||||
package app
|
package app
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build (linux && !android) || freebsd || openbsd
|
//go:build (linux && !android) || freebsd || openbsd
|
||||||
// +build linux,!android freebsd openbsd
|
|
||||||
|
|
||||||
package app
|
package app
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build android || (darwin && ios)
|
//go:build android || (darwin && ios)
|
||||||
// +build android darwin,ios
|
|
||||||
|
|
||||||
package app
|
package app
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build !novulkan
|
//go:build !novulkan
|
||||||
// +build !novulkan
|
|
||||||
|
|
||||||
package app
|
package app
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build linux || freebsd || openbsd
|
//go:build linux || freebsd || openbsd
|
||||||
// +build linux freebsd openbsd
|
|
||||||
|
|
||||||
package headless
|
package headless
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ func Parse() {
|
|||||||
}
|
}
|
||||||
print := false
|
print := false
|
||||||
silent := false
|
silent := false
|
||||||
for _, part := range strings.Split(val, ",") {
|
for part := range strings.SplitSeq(val, ",") {
|
||||||
switch part {
|
switch part {
|
||||||
case textSubsystem:
|
case textSubsystem:
|
||||||
Text.Store(true)
|
Text.Store(true)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
//go:build !js
|
//go:build !js
|
||||||
// +build !js
|
|
||||||
|
|
||||||
package gl
|
package gl
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ func BenchmarkSplitCubic(b *testing.B) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, s := range scenarios {
|
for _, s := range scenarios {
|
||||||
s := s
|
|
||||||
b.Run(strconv.Itoa(s.segments), func(b *testing.B) {
|
b.Run(strconv.Itoa(s.segments), func(b *testing.B) {
|
||||||
from, ctrl0, ctrl1, to := s.from, s.ctrl0, s.ctrl1, s.to
|
from, ctrl0, ctrl1, to := s.from, s.ctrl0, s.ctrl1, s.to
|
||||||
quads := make([]QuadSegment, s.segments)
|
quads := make([]QuadSegment, s.segments)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build !darwin
|
//go:build !darwin
|
||||||
// +build !darwin
|
|
||||||
|
|
||||||
package key
|
package key
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
//go:build !race
|
//go:build !race
|
||||||
// +build !race
|
|
||||||
|
|
||||||
package layout
|
package layout
|
||||||
|
|
||||||
|
|||||||
+2
-8
@@ -362,10 +362,7 @@ func (e *textView) PaintText(gtx layout.Context, material op.CallOp) {
|
|||||||
// caretWidth returns the width occupied by the caret for the current
|
// caretWidth returns the width occupied by the caret for the current
|
||||||
// gtx.
|
// gtx.
|
||||||
func (e *textView) caretWidth(gtx layout.Context) int {
|
func (e *textView) caretWidth(gtx layout.Context) int {
|
||||||
carWidth2 := gtx.Dp(1) / 2
|
carWidth2 := max(gtx.Dp(1)/2, 1)
|
||||||
if carWidth2 < 1 {
|
|
||||||
carWidth2 = 1
|
|
||||||
}
|
|
||||||
return carWidth2
|
return carWidth2
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -434,10 +431,7 @@ func (e *textView) ScrollBounds() image.Rectangle {
|
|||||||
if e.SingleLine {
|
if e.SingleLine {
|
||||||
if len(e.index.lines) > 0 {
|
if len(e.index.lines) > 0 {
|
||||||
line := e.index.lines[0]
|
line := e.index.lines[0]
|
||||||
b.Min.X = line.xOff.Floor()
|
b.Min.X = min(line.xOff.Floor(), 0)
|
||||||
if b.Min.X > 0 {
|
|
||||||
b.Min.X = 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
b.Max.X = e.dims.Size.X + b.Min.X - e.viewSize.X
|
b.Max.X = e.dims.Size.X + b.Min.X - e.viewSize.X
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user