draft #1976 by johanmalm

various menu changes necessary for further menu work
This commit is contained in:
Droc 2024-08-17 08:47:14 -05:00
parent 497d3d8e05
commit 50542bbf84
8 changed files with 120 additions and 38 deletions

View file

@ -27,6 +27,12 @@ struct menu_scene {
struct scaled_font_buffer *buffer;
};
enum menuitem_type {
LAB_MENU_ITEM = 0,
LAB_MENU_SEPARATOR_LINE,
LAB_MENU_TITLE,
};
struct menuitem {
struct wl_list actions;
char *execute;
@ -34,6 +40,7 @@ struct menuitem {
struct menu *parent;
struct menu *submenu;
bool selectable;
enum menuitem_type type;
int height;
int native_width;
struct wlr_scene_tree *tree;
@ -46,7 +53,6 @@ struct menuitem {
struct menu {
char *id;
char *label;
int item_height;
struct menu *parent;
struct {

View file

@ -61,6 +61,7 @@ struct theme {
int menu_item_padding_x;
int menu_item_padding_y;
int menu_item_height;
float menu_items_bg_color[4];
float menu_items_text_color[4];
@ -75,6 +76,8 @@ struct theme {
int menu_separator_padding_height;
float menu_separator_color[4];
float menu_title_bg_color[4];
int osd_border_width;
float osd_bg_color[4];