Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Commit

Permalink
Improve some this in the code...
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom5521 committed Dec 30, 2023
1 parent 9db1c37 commit f44a551
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/gui/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (ui *ui) MakeRecList(l *[]data.Record) *widget.List {
return len(*l)
},
func() fyne.CanvasObject {
return widget.NewLabel("template")
return &widget.Label{}
},
func(i widget.ListItemID, o fyne.CanvasObject) {
l := *l
Expand Down
4 changes: 3 additions & 1 deletion internal/gui/students.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func (ui ui) GetStudentsList(students *[]data.Student) *widget.List {
}

func (ui *ui) LoadStudentInfo(s *data.Student) {
// 1: Light | 0: Dark
var currentColor color.Color
if fyne.CurrentApp().Settings().ThemeVariant() == 1 {
currentColor = color.Black
Expand All @@ -65,7 +66,7 @@ func (ui *ui) LoadStudentInfo(s *data.Student) {
return label
}
tagLabel := func(inputText any) *canvas.Text {
text := fmt.Sprint((inputText))
text := fmt.Sprint(inputText)
label := itemLabel(po.Get(text), 90)
label.TextSize = 20
label.TextStyle.Bold = true
Expand Down Expand Up @@ -104,6 +105,7 @@ func (ui *ui) LoadStudentInfo(s *data.Student) {
),
)
ui.StudentTab.Objects = []fyne.CanvasObject{content}
ui.StudentTab.Refresh()
}

func getAgeEntry(app fyne.App, ageEntry *widget.Entry) uint {
Expand Down

0 comments on commit f44a551

Please sign in to comment.