Refine YearMood widget formatting: adjust day spacing and alignment for improved readability
This commit is contained in:
parent
97c26b30e9
commit
ef962bbc49
@ -39,7 +39,7 @@ func createYearMood(ctx context.Context, _ terminalapi.Terminal, _ interface{})
|
||||
go util.Periodic(ctx, 1*time.Hour, func() error {
|
||||
widget.Reset()
|
||||
|
||||
if err := widget.Write(" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec \n\n", text.WriteCellOpts(cell.FgColor(cell.ColorWhite))); err != nil {
|
||||
if err := widget.Write(" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec\n\n", text.WriteCellOpts(cell.FgColor(cell.ColorWhite))); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -76,11 +76,11 @@ func createYearMood(ctx context.Context, _ terminalapi.Terminal, _ interface{})
|
||||
if err := widget.Write(">", text.WriteCellOpts(append(cellOptions, cell.Blink())...)); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := widget.Write(fmt.Sprintf("%3d", day+1), text.WriteCellOpts(cellOptions...)); err != nil {
|
||||
if err := widget.Write(fmt.Sprintf("%2d", day+1), text.WriteCellOpts(cellOptions...)); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if err := widget.Write(fmt.Sprintf(" %3d", day+1), text.WriteCellOpts(cellOptions...)); err != nil {
|
||||
if err := widget.Write(fmt.Sprintf(" %2d", day+1), text.WriteCellOpts(cellOptions...)); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@ -94,7 +94,7 @@ func createYearMood(ctx context.Context, _ terminalapi.Terminal, _ interface{})
|
||||
}
|
||||
}
|
||||
|
||||
if err := widget.Write(" "); err != nil {
|
||||
if err := widget.Write(" "); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user