mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
Fix sizes bug
Remove redundant menu package
This commit is contained in:
parent
e5da0eb5f8
commit
746b4dfc04
2 changed files with 3 additions and 25 deletions
|
|
@ -82,8 +82,8 @@ func generateExampleIcon() error {
|
|||
func parseSizes(sizes string) ([]int, error) {
|
||||
// split the input string by comma and confirm that each one is an integer
|
||||
parsedSizes := strings.Split(sizes, ",")
|
||||
result := make([]int, len(parsedSizes))
|
||||
for i, size := range parsedSizes {
|
||||
var result []int
|
||||
for _, size := range parsedSizes {
|
||||
s, err := strconv.Atoi(size)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -91,7 +91,7 @@ func parseSizes(sizes string) ([]int, error) {
|
|||
if s == 0 {
|
||||
continue
|
||||
}
|
||||
result[i] = s
|
||||
result = append(result, s)
|
||||
}
|
||||
|
||||
// put all integers in a slice and return
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
package menu
|
||||
|
||||
type Menu struct {
|
||||
Items []*Item
|
||||
}
|
||||
|
||||
func (m *Menu) Label(label string) *Item {
|
||||
return &Item{
|
||||
Label: label,
|
||||
}
|
||||
}
|
||||
|
||||
type CallbackContext struct {
|
||||
MenuItem *Item
|
||||
}
|
||||
|
||||
type Item struct {
|
||||
Label string
|
||||
Disabled bool
|
||||
Click func(*CallbackContext)
|
||||
ID uint
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue