Skip to content

Commit 3ccf033

Browse files
authored
Merge pull request #42 from sqshq/fix_triggers_for_textboxes_and_asciiboxes
Fix triggers functionality for textboxes and asciiboxes
2 parents 5eb260b + 63bc5a0 commit 3ccf033

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

component/nag.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ func (n *NagWindow) Draw(buffer *ui.Buffer) {
4747
buffer)
4848
}
4949

50-
buffer.SetString(string(buttonOk), ui.NewStyle(n.palette.ReverseColor, n.palette.BaseColor),
51-
util.GetMiddlePoint(n.Block.Rectangle, string(buttonOk), 4))
50+
buffer.SetString(buttonOk, ui.NewStyle(n.palette.ReverseColor, n.palette.BaseColor),
51+
util.GetMiddlePoint(n.Block.Rectangle, buttonOk, 4))
5252

5353
n.Block.Draw(buffer)
5454
}

config/default.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func (c *Config) setDefaultValues() {
111111
box.RateMs = &r
112112
}
113113
if box.Label == nil {
114-
label := string(i)
114+
label := box.Title
115115
box.Label = &label
116116
}
117117
if box.Font == nil {
@@ -135,7 +135,7 @@ func (c *Config) setDefaultValues() {
135135
box.RateMs = &r
136136
}
137137
if box.Label == nil {
138-
label := string(i)
138+
label := box.Title
139139
box.Label = &label
140140
}
141141
if box.Border == nil {

0 commit comments

Comments
 (0)