File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,13 @@ proc text*(node: Text, text: string) {.thisWrapper.} =
61
61
proc font* (node: Text, font: UiFont) {.thisWrapper.} =
62
62
node.font = font
63
63
64
- proc foreground* (node: Text, color: Color) {.thisWrapper.} =
64
+ proc foreground* (node: Text, color: Color) =
65
65
node.color = color
66
66
67
+ template foreground* (color: Color) =
68
+ mixin foreground
69
+ this.foreground(color)
70
+
67
71
proc align* (node: Text, kind: FontVertical) {.thisWrapper.} =
68
72
node.vAlign = kind
69
73
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ proc draw*(self: Main) {.slot.} =
82
82
skipOnInput ':'
83
83
if this.disabled:
84
84
fill this.fill.darken(0.4 )
85
- this. foreground css" grey"
85
+ foreground css" grey"
86
86
proc overrideUpdateInput(this: Input, rune: Rune) {.slot.} =
87
87
let isDigit = rune <= % Rune('9' ) and rune.char in {'0' .. '9' }
88
88
template currCharColon(): bool = this.text.runeAtCursor() == Rune(':' )
You can’t perform that action at this time.
0 commit comments