WIP components (as built)
This commit is contained in:
96 files changed
+6468
-16
No files matched your search
@@ -1,7 +1,6 @@
|
||||
package mujica
|
||||
|
||||
import (
|
||||
"math"
|
||||
"strings"
|
||||
|
||||
"github.com/egoist/mygo/ui"
|
||||
@@ -162,13 +161,6 @@ func codeBadge(c *ui.Context, letter string, col ui.Color) {
|
||||
})
|
||||
}
|
||||
|
||||
// codeRule draws a pixel-aligned 1 DIP line.
|
||||
func codeRule(p *ui.Painter, x0, x1, y float32, c ui.Color) {
|
||||
s := float64(p.Scale())
|
||||
yy := float32((math.Floor(float64(y)*s) + 0.5) / s)
|
||||
p.Line(x0, yy, x1, yy, 1, c)
|
||||
}
|
||||
|
||||
// codeTextWidth returns the width of s in the code font.
|
||||
func codeTextWidth(c *ui.Context, s string) float32 {
|
||||
w, _ := c.MeasureText(0, ui.Span{Text: s, Font: theme.MonoFont, Size: FontSize(c, codeSize)})
|
||||
|
||||
Reference in new issue
Block a user