mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Cleanup unwanted comments
This commit is contained in:
parent
348b2ffa5d
commit
3ad04c4969
@ -20,7 +20,7 @@ func renderWidget(widgetSettings Settings) string {
|
|||||||
return mergeLines(outputStrings)
|
return mergeLines(outputStrings)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (widget *Widget) display(dateFormat string, timeFormat string) {
|
func (widget *Widget) display() {
|
||||||
widget.Redraw(func() (string, string, bool) {
|
widget.Redraw(func() (string, string, bool) {
|
||||||
return widget.CommonSettings().Title, renderWidget(*widget.settings), false
|
return widget.CommonSettings().Title, renderWidget(*widget.settings), false
|
||||||
})
|
})
|
||||||
|
@ -48,8 +48,6 @@ func getDigitalFont() ClockFont {
|
|||||||
"9": {"▄▀▀▄", "▀▄▄█", " ▄▄▀"},
|
"9": {"▄▀▀▄", "▀▄▄█", " ▄▄▀"},
|
||||||
"0": {"█▀▀█", "█ █", "█▄▄█"},
|
"0": {"█▀▀█", "█ █", "█▄▄█"},
|
||||||
":": {"█", " ", "█"},
|
":": {"█", " ", "█"},
|
||||||
// "A": {" ", " ", "█▀█ █▀█▀█"},
|
|
||||||
// "P": {" ", " ", "█▀ █▀█▀█"},
|
|
||||||
" ": {" ", " ", " "},
|
" ": {" ", " ", " "},
|
||||||
"A": {"", "", "AM"},
|
"A": {"", "", "AM"},
|
||||||
"P": {"", "", "PM"},
|
"P": {"", "", "PM"},
|
||||||
@ -72,8 +70,6 @@ func getBigFont() ClockFont {
|
|||||||
"9": {"┏━━━┓", "┃┏━┓┃", "┃┗━┛┃", "┗━━┓┃", "┏━━┛┃", "┗━━━┛"},
|
"9": {"┏━━━┓", "┃┏━┓┃", "┃┗━┛┃", "┗━━┓┃", "┏━━┛┃", "┗━━━┛"},
|
||||||
"0": {"┏━━━┓", "┃┏━┓┃", "┃┃ ┃┃", "┃┃ ┃┃", "┃┗━┛┃", "┗━━━┛"},
|
"0": {"┏━━━┓", "┃┏━┓┃", "┃┃ ┃┃", "┃┃ ┃┃", "┃┗━┛┃", "┗━━━┛"},
|
||||||
":": {" ", "┏━┓", "┗━┛", "┏━┓", "┗━┛", " "},
|
":": {" ", "┏━┓", "┗━┛", "┏━┓", "┗━┛", " "},
|
||||||
// "A": {" ", " ", " ", "┏━━┓ ┏┓┏┓", "┃┏━┛ ┃┗┛┃", "┗┛ ┗┻┻┛"},
|
|
||||||
// "P": {" ", " ", " ", "┏━━┓ ┏┓┏┓", "┃┏┓┃ ┃┗┛┃", "┗┛┗┛ ┗┻┻┛"},
|
|
||||||
" ": {" ", " ", " ", " ", " ", " "},
|
" ": {" ", " ", " ", " ", " ", " "},
|
||||||
"A": {"", "", "", "", "", "AM"},
|
"A": {"", "", "", "", "", "AM"},
|
||||||
"P": {"", "", "", "", "", "PM"},
|
"P": {"", "", "", "", "", "PM"},
|
||||||
|
@ -5,15 +5,15 @@ import (
|
|||||||
"github.com/wtfutil/wtf/view"
|
"github.com/wtfutil/wtf/view"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Widget a text widget struct to hold info about the current widget
|
||||||
type Widget struct {
|
type Widget struct {
|
||||||
view.TextWidget
|
view.TextWidget
|
||||||
|
|
||||||
app *tview.Application
|
app *tview.Application
|
||||||
dateFormat string
|
settings *Settings
|
||||||
timeFormat string
|
|
||||||
settings *Settings
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewWidget creates a new widget using settings
|
||||||
func NewWidget(app *tview.Application, settings *Settings) *Widget {
|
func NewWidget(app *tview.Application, settings *Settings) *Widget {
|
||||||
|
|
||||||
widget := Widget{
|
widget := Widget{
|
||||||
@ -31,7 +31,7 @@ func NewWidget(app *tview.Application, settings *Settings) *Widget {
|
|||||||
// Refresh updates the onscreen contents of the widget
|
// Refresh updates the onscreen contents of the widget
|
||||||
func (widget *Widget) Refresh() {
|
func (widget *Widget) Refresh() {
|
||||||
widget.app.QueueUpdateDraw(func() {
|
widget.app.QueueUpdateDraw(func() {
|
||||||
widget.display(widget.dateFormat, widget.timeFormat)
|
widget.display()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user