mirror of
https://github.com/akiyosi/goneovim.git
synced 2025-08-29 22:19:33 +02:00
WIP
This commit is contained in:
parent
124b4d134e
commit
1777efebd1
4 changed files with 319 additions and 67 deletions
|
@ -1,6 +1,8 @@
|
|||
package util
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/therecipe/qt/gui"
|
||||
"github.com/therecipe/qt/core"
|
||||
"github.com/therecipe/qt/widgets"
|
||||
|
@ -64,6 +66,24 @@ func IsTrue(d interface{}) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func SplitVimscript(s string) string {
|
||||
if string(s[0]) == "\n" {
|
||||
s = strings.TrimPrefix(s, string("\n"))
|
||||
}
|
||||
listLines := "["
|
||||
lines := strings.Split(s, "\n")
|
||||
for i, line := range lines {
|
||||
listLines = listLines + `'` + line + `'`
|
||||
if i == len(lines)-1 {
|
||||
listLines = listLines + "]"
|
||||
} else {
|
||||
listLines = listLines + ","
|
||||
}
|
||||
}
|
||||
|
||||
return listLines
|
||||
}
|
||||
|
||||
func DropShadow(x, y, radius float64, alpha int) *widgets.QGraphicsDropShadowEffect{
|
||||
shadow := widgets.NewQGraphicsDropShadowEffect(nil)
|
||||
shadow.SetBlurRadius(radius)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue