menu: refactor in preparation for richer menu design

This commit separates the process of creating scene-trees of the menu
items into `{item,separator,title}_create_scene()`. This will make it
easier to draw richer menu designs like borders, paddings and rounded
corners.
This commit is contained in:
tokyo4j 2024-11-10 18:54:01 +09:00 committed by Johan Malm
parent 90fad69027
commit 7651531632
2 changed files with 158 additions and 166 deletions

View file

@ -37,11 +37,12 @@ struct menuitem {
struct wl_list actions;
char *execute;
char *id; /* needed for pipemenus */
char *text;
const char *arrow;
struct menu *parent;
struct menu *submenu;
bool selectable;
enum menuitem_type type;
int height;
int native_width;
struct wlr_scene_tree *tree;
struct menu_scene normal;