Skip to content

Disabled app tabs can still be selected in popup menu #4935

Closed
@ErikKalkoken

Description

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

An app tab can be disabled, which are then greyed out and the user can normally no longer select hem.

However, when the app tabs do not fit into the current window, some are shown in a popup menu. The popup menu also shows the disabled app tabs and the user can still select them there.

How to reproduce

  1. Show app tabs with at least one disabled tab
  2. Resize the windows manually to force some app tabs to be shown as popup
  3. Select a disabled tab from the popup menu

Screenshots

No response

Example code

package main

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/widget"
)

func main() {
	a := app.New()
	w := a.NewWindow("TabContainer Widget")
	tabs := container.NewAppTabs(
		container.NewTabItem("Tab 1", widget.NewLabel("Hello")),
		container.NewTabItem("Tab 2", widget.NewLabel("World!")),
	)
	tabs.DisableIndex(1)
	w.SetContent(tabs)
	w.Resize(fyne.Size{Width: 400, Height: 200})
	w.ShowAndRun()
}

Fyne version

2.4.4

Go compiler version

1.22.2

Operating system and version

Ubuntu 22.04.4 LTS

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    unverifiedA bug that has been reported but not verified

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions