Commit graph

15 commits

Author SHA1 Message Date
Olivier Goffart
fece71ebf0
Menus: make it possible to have items with different height
Can be usefull for separator
(Required for #8339)
2025-05-19 14:58:31 +02:00
Olivier Goffart
e8012c70d0
Fix MenuBar on android
The ContextMenuArea on android intercepts clicks to trigger on long clicks
and this prevent the MenuBar's TouchArea to work properly

Fixes #8353
2025-05-09 08:58:12 +02:00
Joshua Goins
d1f2fef430
Menu: Add enabled property (#8145)
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
2025-04-15 08:08:11 +02:00
Olivier Goffart
e5289af154 Introduce MenuSeparator
Fixes #7790
2025-04-02 11:50:45 +02:00
Olivier Goffart
6010cf724c Hover on MenuBar should activate menu if a menu is already open
Fixes #7822
2025-03-31 14:06:24 +02:00
FloVanGH
be7c125726
menus: fluent style and refactoring (#7723)
* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-24 17:01:22 +01:00
Olivier Goffart
fe333049ea Fix Menu highlight on hover
Regressed in 5cccfda36f
2025-02-24 09:37:37 +01:00
FloVanGH
5cccfda36f
menu: cleanup code, extract MenuItemImpl (#7696)
* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-22 08:10:54 +01:00
Arnold Loubriat
90c337f1d1
Add AccessibleRole::Image and use it in the AboutSlint widget (#7593)
* Add `AccessibleRole::Image`

* Improve accessibility of the `AboutSlint` widget

* Filter out some images from the accessibility tree
2025-02-18 09:43:53 +01:00
Olivier Goffart
2e4353d3c9 Implement closing of popup menus 2025-02-10 20:27:43 +01:00
Olivier Goffart
c0b72cad2f
ContextMenu: show submenu on hover after a timeout
This means that the parent menu still get the mouse events

Also add the ability to close the menu programmatically
2025-02-07 13:27:32 +01:00
Olivier Goffart
7104c6e88e
Rudimentary key navigation of the popup menu (#7556)
Closing the menus is still not implemented
2025-02-07 10:01:40 +01:00
Olivier Goffart
98e8386aee
MenuBar/ContextMenu: hide the entries interface
This can only be used internally by the style to implement the actual
ContextMenu

Only the declarative `MenuItem` interface is exposed.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-25 11:06:31 +01:00
Olivier Goffart
28e54175f6 Work on the ContextMenu
- Add the `entries` property in the ContextMenu
 - Make right click on the ContextMenu show the menu
 - Use the proper technique to register ContextMenu and MenuBar as
   experimental (same as ComponentContainer)
2025-01-16 20:21:06 +01:00
Olivier Goffart
5bd20def0e Experimental support for MenuBar
Introduces `MenuBar{ ... }` that can be put in a Window
2024-11-20 09:25:37 +01:00