Description
In V1, it used to be possible to apply styles to blurred input fields:
t := huh.ThemeCharm()
t.Blurred.TextInput.Text = lipgloss.NewStyle()....
In V2, these styles are no longer applied.
I've traced this to down to this code here, where there seems to have been an incomplete port to V2 (only sets focused styles):
|
st.Focused.Prompt = styles.TextInput.Prompt |
|
st.Focused.Text = styles.TextInput.Text |
|
st.Focused.Placeholder = styles.TextInput.Placeholder |
versus the original:
i.textinput.PlaceholderStyle = styles.TextInput.Placeholder
i.textinput.PromptStyle = styles.TextInput.Prompt
i.textinput.Cursor.Style = styles.TextInput.Cursor
i.textinput.Cursor.TextStyle = styles.TextInput.CursorText
i.textinput.TextStyle = styles.TextInput.Text
Compared with field_text:
|
if t.focused { |
|
st.Focused.Placeholder = styles.TextInput.Placeholder |
|
st.Focused.Text = styles.TextInput.Text |
|
st.Focused.Prompt = styles.TextInput.Prompt |
|
st.Focused.CursorLine = styles.TextInput.Text |
|
} else { |
|
st.Blurred.Placeholder = styles.TextInput.Placeholder |
|
st.Blurred.Text = styles.TextInput.Text |
|
st.Blurred.Prompt = styles.TextInput.Prompt |
|
st.Blurred.CursorLine = styles.TextInput.Text |
|
} |
Version
v2.0.3
Environment
all
Description
In V1, it used to be possible to apply styles to blurred input fields:
In V2, these styles are no longer applied.
I've traced this to down to this code here, where there seems to have been an incomplete port to V2 (only sets focused styles):
huh/field_input.go
Lines 389 to 391 in e3315eb
versus the original:
Compared with field_text:
huh/field_text.go
Lines 381 to 391 in e3315eb
Version
v2.0.3
Environment
all