func (b *findBox) Init(driver gxui.Driver, theme *basic.Theme, editor gxui.CodeEditor) { b.TextBox.Init(b, driver, theme, theme.DefaultMonospaceFont()) b.editor = editor b.SetTextColor(theme.TextBoxDefaultStyle.FontColor) b.SetMargin(math.Spacing{L: 3, T: 3, R: 3, B: 3}) b.SetPadding(math.Spacing{L: 3, T: 3, R: 3, B: 3}) b.SetBackgroundBrush(theme.TextBoxDefaultStyle.Brush) b.SetDesiredWidth(math.MaxSize.W) b.SetMultiline(false) }
func newFileBox(driver gxui.Driver, theme *basic.Theme) *fileBox { file := new(fileBox) file.TextBox.Init(file, driver, theme, theme.DefaultMonospaceFont()) file.SetTextColor(theme.TextBoxDefaultStyle.FontColor) file.SetMargin(math.Spacing{L: 3, T: 3, R: 3, B: 3}) file.SetPadding(math.Spacing{L: 3, T: 3, R: 3, B: 3}) file.SetBackgroundBrush(theme.TextBoxDefaultStyle.Brush) file.SetDesiredWidth(math.MaxSize.W) file.SetMultiline(false) return file }
func newDirLabel(theme *basic.Theme) *dirLabel { label := new(dirLabel) label.Label.Init(label, theme, theme.DefaultMonospaceFont(), theme.LabelStyle.FontColor) label.SetMargin(math.Spacing{L: 3, T: 3, R: 3, B: 3}) return label }