mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-21 19:39:29 +08:00
Fix comment
This commit is contained in:
parent
39cdd1d1e4
commit
42c6c2b524
@ -26,7 +26,7 @@ type windowsMenuItem struct {
|
||||
func (m *windowsMenuItem) setHidden(hidden bool) {
|
||||
if hidden && !m.hidden {
|
||||
m.hidden = true
|
||||
// iterate the parent items and find the menu item before us
|
||||
// iterate the parent items and find the menu item after us
|
||||
for i, item := range m.parent.items {
|
||||
if item == m.menuItem {
|
||||
if i < len(m.parent.items)-1 {
|
||||
@ -37,14 +37,11 @@ func (m *windowsMenuItem) setHidden(hidden bool) {
|
||||
break
|
||||
}
|
||||
}
|
||||
// Get the position of this menu item in the parent menu
|
||||
// m.pos = w32.GetMenuItemPosition(m.hMenu, uint32(m.id))
|
||||
// Remove from parent menu
|
||||
w32.RemoveMenu(m.hMenu, m.id, w32.MF_BYCOMMAND)
|
||||
} else if !hidden && m.hidden {
|
||||
m.hidden = false
|
||||
// Add to parent menu
|
||||
// Get the position of the item before us
|
||||
// Add to parent menu before the "itemAfter"
|
||||
var pos int
|
||||
if m.itemAfter != nil {
|
||||
for i, item := range m.parent.items {
|
||||
|
Loading…
Reference in New Issue
Block a user