1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Cleanup unwanted comments

This commit is contained in:
Narendra L 2019-09-09 09:28:42 +02:00
parent 348b2ffa5d
commit 3ad04c4969
3 changed files with 6 additions and 10 deletions

View File

@ -20,7 +20,7 @@ func renderWidget(widgetSettings Settings) string {
return mergeLines(outputStrings)
}
func (widget *Widget) display(dateFormat string, timeFormat string) {
func (widget *Widget) display() {
widget.Redraw(func() (string, string, bool) {
return widget.CommonSettings().Title, renderWidget(*widget.settings), false
})

View File

@ -48,8 +48,6 @@ func getDigitalFont() ClockFont {
"9": {"▄▀▀▄", "▀▄▄█", " ▄▄▀"},
"0": {"█▀▀█", "█ █", "█▄▄█"},
":": {"█", " ", "█"},
// "A": {" ", " ", "█▀█ █▀█▀█"},
// "P": {" ", " ", "█▀ █▀█▀█"},
" ": {" ", " ", " "},
"A": {"", "", "AM"},
"P": {"", "", "PM"},
@ -72,8 +70,6 @@ func getBigFont() ClockFont {
"9": {"┏━━━┓", "┃┏━┓┃", "┃┗━┛┃", "┗━━┓┃", "┏━━┛┃", "┗━━━┛"},
"0": {"┏━━━┓", "┃┏━┓┃", "┃┃ ┃┃", "┃┃ ┃┃", "┃┗━┛┃", "┗━━━┛"},
":": {" ", "┏━┓", "┗━┛", "┏━┓", "┗━┛", " "},
// "A": {" ", " ", " ", "┏━━┓ ┏┓┏┓", "┃┏━┛ ┃┗┛┃", "┗┛ ┗┻┻┛"},
// "P": {" ", " ", " ", "┏━━┓ ┏┓┏┓", "┃┏┓┃ ┃┗┛┃", "┗┛┗┛ ┗┻┻┛"},
" ": {" ", " ", " ", " ", " ", " "},
"A": {"", "", "", "", "", "AM"},
"P": {"", "", "", "", "", "PM"},

View File

@ -5,15 +5,15 @@ import (
"github.com/wtfutil/wtf/view"
)
// Widget a text widget struct to hold info about the current widget
type Widget struct {
view.TextWidget
app *tview.Application
dateFormat string
timeFormat string
settings *Settings
}
// NewWidget creates a new widget using settings
func NewWidget(app *tview.Application, settings *Settings) *Widget {
widget := Widget{
@ -31,7 +31,7 @@ func NewWidget(app *tview.Application, settings *Settings) *Widget {
// Refresh updates the onscreen contents of the widget
func (widget *Widget) Refresh() {
widget.app.QueueUpdateDraw(func() {
widget.display(widget.dateFormat, widget.timeFormat)
widget.display()
})
}