mirror of
https://github.com/navidys/tvxwidgets.git
synced 2025-05-09 19:29:29 +08:00
add SetTitleColor and SetTitleAlign to dialog and gauge primitives
Signed-off-by: Navid Yaghoobi <navidys@fedoraproject.org>
This commit is contained in:
parent
c7479b197e
commit
d909054147
1
Makefile
1
Makefile
@ -35,6 +35,7 @@ validate: gofmt lint govet pre-commit codespell ## Validate prometheus-podman-ex
|
||||
.PHONY: lint
|
||||
lint: ## Run golangci-lint
|
||||
@echo "running golangci-lint"
|
||||
GO111MODULE=off
|
||||
$(BIN)/golangci-lint run
|
||||
|
||||
.PHONY: pre-commit
|
||||
|
10
dialog.go
10
dialog.go
@ -84,6 +84,16 @@ func (d *MessageDialog) SetTitle(title string) {
|
||||
d.layout.SetTitle(title)
|
||||
}
|
||||
|
||||
// SetTitleColor sets title color.
|
||||
func (g *MessageDialog) SetTitleColor(color tcell.Color) {
|
||||
g.layout.SetTitleColor(color)
|
||||
}
|
||||
|
||||
// SetTitleAlign sets title alignment.
|
||||
func (g *MessageDialog) SetTitleAlign(align int) {
|
||||
g.Box.SetTitleAlign(align)
|
||||
}
|
||||
|
||||
// SetBackgroundColor sets dialog background color.
|
||||
func (d *MessageDialog) SetBackgroundColor(color tcell.Color) {
|
||||
d.bgColor = color
|
||||
|
10
gauge_am.go
10
gauge_am.go
@ -44,6 +44,16 @@ func (g *ActivityModeGauge) SetTitle(title string) {
|
||||
g.Box.SetTitle(title)
|
||||
}
|
||||
|
||||
// SetTitleAlign sets title alignment.
|
||||
func (g *ActivityModeGauge) SetTitleAlign(align int) {
|
||||
g.Box.SetTitleAlign(align)
|
||||
}
|
||||
|
||||
// SetTitleColor sets title color.
|
||||
func (g *ActivityModeGauge) SetTitleColor(color tcell.Color) {
|
||||
g.Box.SetTitleColor(color)
|
||||
}
|
||||
|
||||
// Focus is called when this primitive receives focus.
|
||||
func (g *ActivityModeGauge) Focus(delegate func(p tview.Primitive)) {
|
||||
}
|
||||
|
10
gauge_pm.go
10
gauge_pm.go
@ -74,6 +74,16 @@ func (g *PercentageModeGauge) SetTitle(title string) {
|
||||
g.Box.SetTitle(title)
|
||||
}
|
||||
|
||||
// SetTitleColor sets title color.
|
||||
func (g *PercentageModeGauge) SetTitleColor(color tcell.Color) {
|
||||
g.Box.SetTitleColor(color)
|
||||
}
|
||||
|
||||
// SetTitleAlign sets title alignment.
|
||||
func (g *PercentageModeGauge) SetTitleAlign(align int) {
|
||||
g.Box.SetTitleAlign(align)
|
||||
}
|
||||
|
||||
// Focus is called when this primitive receives focus.
|
||||
func (g *PercentageModeGauge) Focus(delegate func(p tview.Primitive)) {
|
||||
}
|
||||
|
10
gauge_um.go
10
gauge_um.go
@ -53,6 +53,16 @@ func (g *UtilModeGauge) SetTitle(title string) {
|
||||
g.Box.SetTitle(title)
|
||||
}
|
||||
|
||||
// SetTitleColor sets title color.
|
||||
func (g *UtilModeGauge) SetTitleColor(color tcell.Color) {
|
||||
g.Box.SetTitleColor(color)
|
||||
}
|
||||
|
||||
// SetTitleAlign sets title alignment.
|
||||
func (g *UtilModeGauge) SetTitleAlign(align int) {
|
||||
g.Box.SetTitleAlign(align)
|
||||
}
|
||||
|
||||
// SetLabel sets label for this primitive.
|
||||
func (g *UtilModeGauge) SetLabel(label string) {
|
||||
g.label = label
|
||||
|
Loading…
x
Reference in New Issue
Block a user