Skip to content

Commit

Permalink
fix form data editor styling (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirzakhany authored Jan 12, 2025
1 parent 1520f3e commit 3fa1000
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ui/pages/requests/component/form_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ func (f *FormData) fieldLayouts(gtx layout.Context, theme *chapartheme.Theme, it
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
return layout.Inset{Left: unit.Dp(4), Right: unit.Dp(4)}.Layout(gtx, func(gtx layout.Context) layout.Dimensions {
gtx.Constraints.Min.X = gtx.Dp(unit.Dp(100))
return material.Editor(theme.Material(), item.keyEditor, "Key").Layout(gtx)
editor := material.Editor(theme.Material(), item.keyEditor, "Key")
editor.SelectionColor = theme.TextSelectionColor
return editor.Layout(gtx)
})
}),
widgets.DrawLineFlex(theme.TableBorderColor, unit.Dp(35), unit.Dp(1)),
Expand All @@ -244,7 +246,9 @@ func (f *FormData) fieldLayouts(gtx layout.Context, theme *chapartheme.Theme, it
if itemType == string(FormDataFieldTypeText) {
items = append(items, layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
return layout.Inset{Left: unit.Dp(4), Right: unit.Dp(4)}.Layout(gtx, func(gtx layout.Context) layout.Dimensions {
return material.Editor(theme.Material(), item.valueEditor, "Value").Layout(gtx)
editor := material.Editor(theme.Material(), item.valueEditor, "Value")
editor.SelectionColor = theme.TextSelectionColor
return editor.Layout(gtx)
})
}))
}
Expand Down

0 comments on commit 3fa1000

Please sign in to comment.