add log and use monospace

This commit is contained in:
Simon Vieille 2022-09-13 14:30:58 +02:00
parent 90c88e3672
commit 477e2a119b
Signed by: deblan
GPG Key ID: 579388D585F70417
1 changed files with 3 additions and 0 deletions

View File

@ -171,6 +171,7 @@ func updateConfigFile(config Config, content string) error {
func createTextarea() *widget.Entry {
textarea := widget.NewMultiLineEntry()
textarea.TextStyle.Monospace = true
textarea.OnChanged = func(text string) {
textarea.SetMinRowsVisible(strings.Count(text, "\n"))
textarea.Refresh()
@ -251,6 +252,8 @@ func createTab(config Config) *fyne.Container {
updateTextareaConfiguration(textareaConfiguration, configuration)
err := updateConfigFile(config, configuration)
log.Println("Configuration of", config.Name)
if err != nil {
updateNotice(notice, fmt.Sprintf("Error while updating: %s", err), red, true, false)
} else {