Browse Source

Update presentation demo cover text

tablepad
Trevor Slocum 2 years ago
parent
commit
1cbf8e9f74
  1. 1
      CHANGELOG
  2. 11
      application.go
  3. 8
      demos/presentation/cover.go

1
CHANGELOG

@ -1,5 +1,6 @@
v1.4.5 (WIP)
- Add multithreading support
- Merge upstream mouse support
v1.4.4 (2020-02-24)
- Fix panic when navigating empty list

11
application.go

@ -12,9 +12,6 @@ const (
// The size of the event/update/redraw channels.
queueSize = 100
// The minimum time between two consecutive redraws.
redrawPause = 50 * time.Millisecond
// The minimum duration between resize event callbacks.
resizeEventThrottle = 200 * time.Millisecond
)
@ -47,14 +44,6 @@ const (
MouseScrollRight
)
// queuedUpdate represented the execution of f queued by
// Application.QueueUpdate(). The "done" channel receives exactly one element
// after f has executed.
type queuedUpdate struct {
f func()
done chan struct{}
}
// Application represents the top node of an application.
//
// It is not strictly required to use this class as none of the other classes

8
demos/presentation/cover.go

@ -18,8 +18,8 @@ const logo = `
const (
subtitle = `Terminal-based user interface toolkit`
navigation = `Ctrl-N: Next slide Ctrl-P: Previous slide Ctrl-C: Exit`
mouse = `(or use your mouse)`
mouse = `Navigate with your keyboard or mouse.`
navigation = `Next slide: Ctrl-N Previous: Ctrl-P Exit: Ctrl-C`
)
// Cover returns the cover page.
@ -45,8 +45,8 @@ func Cover(nextSlide func()) (title string, content cview.Primitive) {
SetBorders(0, 0, 0, 0, 0, 0).
AddText(subtitle, true, cview.AlignCenter, tcell.ColorWhite).
AddText("", true, cview.AlignCenter, tcell.ColorWhite).
AddText(navigation, true, cview.AlignCenter, tcell.ColorDarkMagenta).
AddText(mouse, true, cview.AlignCenter, tcell.ColorDarkMagenta)
AddText(mouse, true, cview.AlignCenter, tcell.ColorDarkMagenta).
AddText(navigation, true, cview.AlignCenter, tcell.ColorDarkMagenta)
// Create a Flex layout that centers the logo and subtitle.
flex := cview.NewFlex().

Loading…
Cancel
Save