Skip to content

More properties for MenuItem: icon #7791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ogoffart opened this issue Mar 4, 2025 · 0 comments · May be fixed by #8182
Open

More properties for MenuItem: icon #7791

ogoffart opened this issue Mar 4, 2025 · 0 comments · May be fixed by #8182
Labels
a:language-slint Compiler for the .slint language (mO,bF)

Comments

@ogoffart
Copy link
Member

ogoffart commented Mar 4, 2025

We should add a way to disable MenuItem and have an Icon

Menu {
   MenuItem { 
       title: @tr("Copy");
       icon: @image-url("icons/copy.png")
       enabled: root.has-selection;
       activated => { ... }
   } 
}

Update: enabled property was added in #8145
This issue now tracks the icon property.

@ogoffart ogoffart added a:language-slint Compiler for the .slint language (mO,bF) enhancement New feature or request labels Mar 4, 2025
redstrate added a commit to redstrate/slint that referenced this issue Apr 14, 2025
By default it's enabled, of course. This property is not only added to
MenuItem, but Menu as well - since they can be nested. It's also
possible to select a disabled item, but it's hard to modify that since
it's logic is written in Slint. You should be prevented from activating
it with a tap or key press at least.

See slint-ui#7791
redstrate added a commit to redstrate/slint that referenced this issue Apr 14, 2025
By default it's enabled, of course. This property is not only added to
MenuItem, but Menu as well - since they can be nested. It's also
possible to select a disabled item, but it's hard to modify that since
it's logic is written in Slint. You should be prevented from activating
it with a tap or key press at least.

See slint-ui#7791
ogoffart pushed a commit that referenced this issue Apr 15, 2025
By default it's enabled, of course. This property is not only added to
MenuItem, but Menu as well - since they can be nested. It's also
possible to select a disabled item, but it's hard to modify that since
it's logic is written in Slint. You should be prevented from activating
it with a tap or key press at least.

See #7791
@ogoffart ogoffart changed the title More properties for MenuItem: enabled, icon More properties for MenuItem: ~enabled~~, icon Apr 15, 2025
@ogoffart ogoffart changed the title More properties for MenuItem: ~enabled~~, icon More properties for MenuItem: ~~enabled~~, icon Apr 15, 2025
@ogoffart ogoffart changed the title More properties for MenuItem: ~~enabled~~, icon More properties for MenuItem: icon Apr 15, 2025
redstrate added a commit to redstrate/slint that referenced this issue Apr 16, 2025
This adds an icon that is displayed to the left of the title, and is
also shown for Menus are inside of a parent menu.

Closes slint-ui#7791
@redstrate redstrate linked a pull request Apr 16, 2025 that will close this issue
redstrate added a commit to redstrate/slint that referenced this issue Apr 28, 2025
This adds an icon that is displayed to the left of the title, and is
also shown for Menus are inside of a parent menu.

Closes slint-ui#7791
redstrate added a commit to redstrate/slint that referenced this issue Apr 28, 2025
This adds an icon that is displayed to the left of the title, and is
also shown for Menus are inside of a parent menu.

Closes slint-ui#7791
redstrate added a commit to redstrate/slint that referenced this issue May 7, 2025
This adds an icon that is displayed to the left of the title, and is
also shown for Menus are inside of a parent menu.

Closes slint-ui#7791
redstrate added a commit to redstrate/slint that referenced this issue May 7, 2025
This adds an icon that is displayed to the left of the title, and is
also shown for Menus are inside of a parent menu.

Closes slint-ui#7791
redstrate added a commit to redstrate/slint that referenced this issue May 7, 2025
This adds an icon that is displayed to the left of the title, and is
also shown for Menus are inside of a parent menu.

Closes slint-ui#7791
@ogoffart ogoffart removed the enhancement New feature or request label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:language-slint Compiler for the .slint language (mO,bF)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant