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