mirror of
https://github.com/taigrr/wtf
synced 2026-04-01 20:38:43 -07:00
Update dependencies
This commit is contained in:
2
vendor/github.com/rivo/tview/LICENSE.txt
generated
vendored
2
vendor/github.com/rivo/tview/LICENSE.txt
generated
vendored
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) [year] [fullname]
|
||||
Copyright (c) 2018 Oliver Kuederle
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
14
vendor/github.com/rivo/tview/box.go
generated
vendored
14
vendor/github.com/rivo/tview/box.go
generated
vendored
@@ -32,6 +32,9 @@ type Box struct {
|
||||
// The color of the border.
|
||||
borderColor tcell.Color
|
||||
|
||||
// The style attributes of the border.
|
||||
borderAttributes tcell.AttrMask
|
||||
|
||||
// The title. Only visible if there is a border, too.
|
||||
title string
|
||||
|
||||
@@ -193,6 +196,15 @@ func (b *Box) SetBorderColor(color tcell.Color) *Box {
|
||||
return b
|
||||
}
|
||||
|
||||
// SetBorderAttributes sets the border's style attributes. You can combine
|
||||
// different attributes using bitmask operations:
|
||||
//
|
||||
// box.SetBorderAttributes(tcell.AttrUnderline | tcell.AttrBold)
|
||||
func (b *Box) SetBorderAttributes(attr tcell.AttrMask) *Box {
|
||||
b.borderAttributes = attr
|
||||
return b
|
||||
}
|
||||
|
||||
// SetTitle sets the box's title.
|
||||
func (b *Box) SetTitle(title string) *Box {
|
||||
b.title = title
|
||||
@@ -233,7 +245,7 @@ func (b *Box) Draw(screen tcell.Screen) {
|
||||
|
||||
// Draw border.
|
||||
if b.border && b.width >= 2 && b.height >= 2 {
|
||||
border := background.Foreground(b.borderColor)
|
||||
border := background.Foreground(b.borderColor) | tcell.Style(b.borderAttributes)
|
||||
var vertical, horizontal, topLeft, topRight, bottomLeft, bottomRight rune
|
||||
if b.focus.HasFocus() {
|
||||
horizontal = Borders.HorizontalFocus
|
||||
|
||||
2
vendor/github.com/rivo/tview/form.go
generated
vendored
2
vendor/github.com/rivo/tview/form.go
generated
vendored
@@ -26,7 +26,7 @@ type FormItem interface {
|
||||
// required.
|
||||
GetFieldWidth() int
|
||||
|
||||
// SetEnteredFunc sets the handler function for when the user finished
|
||||
// SetFinishedFunc sets the handler function for when the user finished
|
||||
// entering data into the item. The handler may receive events for the
|
||||
// Enter key (we're done), the Escape key (cancel input), the Tab key (move to
|
||||
// next field), and the Backtab key (move to previous field).
|
||||
|
||||
5
vendor/github.com/rivo/tview/modal.go
generated
vendored
5
vendor/github.com/rivo/tview/modal.go
generated
vendored
@@ -40,6 +40,11 @@ func NewModal() *Modal {
|
||||
SetButtonBackgroundColor(Styles.PrimitiveBackgroundColor).
|
||||
SetButtonTextColor(Styles.PrimaryTextColor)
|
||||
m.form.SetBackgroundColor(Styles.ContrastBackgroundColor).SetBorderPadding(0, 0, 0, 0)
|
||||
m.form.SetCancelFunc(func() {
|
||||
if m.done != nil {
|
||||
m.done(-1, "")
|
||||
}
|
||||
})
|
||||
m.frame = NewFrame(m.form).SetBorders(0, 0, 1, 0, 0, 0)
|
||||
m.frame.SetBorder(true).
|
||||
SetBackgroundColor(Styles.ContrastBackgroundColor).
|
||||
|
||||
Reference in New Issue
Block a user