99 lines
2.0 KiB
Go
99 lines
2.0 KiB
Go
package view
|
|
|
|
import (
|
|
"fyne.io/fyne/v2"
|
|
"fyne.io/fyne/v2/container"
|
|
"fyne.io/fyne/v2/lang"
|
|
"fyne.io/fyne/v2/theme"
|
|
"fyne.io/fyne/v2/widget"
|
|
)
|
|
|
|
func HelpFFplay() fyne.CanvasObject {
|
|
data := [][]string{
|
|
[]string{
|
|
lang.L("helpFFplayKeys"),
|
|
lang.L("helpFFplayDescription"),
|
|
},
|
|
[]string{
|
|
"Q, ESC",
|
|
lang.L("helpFFplayQuit"),
|
|
},
|
|
[]string{
|
|
"F, " + lang.L("helpFFplayDoubleClickLeftMouseButton"),
|
|
lang.L("helpFFplayToggleFullScreen"),
|
|
},
|
|
[]string{
|
|
"P, " + lang.L("helpFFplayKeySpace"),
|
|
lang.L("helpFFplayPause"),
|
|
},
|
|
[]string{
|
|
"M",
|
|
lang.L("helpFFplayToggleMute"),
|
|
},
|
|
[]string{
|
|
"9, /",
|
|
lang.L("helpFFplayDecreaseVolume"),
|
|
},
|
|
[]string{
|
|
"0, *",
|
|
lang.L("helpFFplayIncreaseVolume"),
|
|
},
|
|
[]string{
|
|
lang.L("helpFFplayKeyLeft"),
|
|
lang.L("helpFFplaySeekBackward10Seconds"),
|
|
},
|
|
[]string{
|
|
lang.L("helpFFplayKeyRight"),
|
|
lang.L("helpFFplaySeekForward10Seconds"),
|
|
},
|
|
[]string{
|
|
lang.L("helpFFplayKeyDown"),
|
|
lang.L("helpFFplaySeekBackward1Minute"),
|
|
},
|
|
[]string{
|
|
lang.L("helpFFplayKeyUp"),
|
|
lang.L("helpFFplaySeekBForward1Minute"),
|
|
},
|
|
[]string{
|
|
"Page Down",
|
|
lang.L("helpFFplaySeekBackward10Minutes"),
|
|
},
|
|
[]string{
|
|
"Page Up",
|
|
lang.L("helpFFplaySeekBForward10Minutes"),
|
|
},
|
|
[]string{
|
|
"S, " + lang.L("helpFFplayKeyHoldS"),
|
|
lang.L("helpFFplayActivateFrameStepMode"),
|
|
},
|
|
[]string{
|
|
"W",
|
|
lang.L("helpFFplayCycleVideoFiltersOrShowModes"),
|
|
},
|
|
}
|
|
|
|
list := widget.NewTable(
|
|
func() (int, int) {
|
|
return len(data), len(data[0])
|
|
},
|
|
func() fyne.CanvasObject {
|
|
return widget.NewLabel("")
|
|
},
|
|
func(i widget.TableCellID, o fyne.CanvasObject) {
|
|
if i.Row == 0 {
|
|
o.(*widget.Label).TextStyle.Bold = true
|
|
o.(*widget.Label).SizeName = theme.SizeNameSubHeadingText
|
|
}
|
|
if i.Col == 0 {
|
|
o.(*widget.Label).TextStyle.Bold = true
|
|
}
|
|
o.(*widget.Label).SetText(data[i.Row][i.Col])
|
|
})
|
|
list.SetRowHeight(0, 40)
|
|
list.SetColumnWidth(0, 200)
|
|
list.SetColumnWidth(1, 585)
|
|
list.SetRowHeight(2, 55)
|
|
|
|
return container.NewScroll(list)
|
|
}
|