theme: add window.button.height

window.button.{height,width} determine the space allocated for buttons.
Buttons can be smaller than this size and will then just be center aligned
within the allocated space. However, buttons will be clamped at this size
to prevent them from going outside of the allocated space.
This commit is contained in:
Johan Malm 2024-09-20 20:59:01 +01:00
parent be18050479
commit 0aa4cfe32d
5 changed files with 32 additions and 16 deletions

View file

@ -146,7 +146,7 @@ struct ssd_part *add_scene_buffer(
struct wlr_scene_tree *parent, struct wlr_buffer *buffer, int x, int y);
struct ssd_part *add_scene_button(struct wl_list *part_list,
enum ssd_part_type type, struct wlr_scene_tree *parent,
struct lab_data_buffer *buffers[LAB_BS_ALL + 1], int x,
struct lab_data_buffer *buffers[LAB_BS_ALL + 1], int x, int y,
struct view *view);
void update_window_icon_buffer(struct wlr_scene_node *button_node,
struct lab_data_buffer *buffer);

View file

@ -67,10 +67,11 @@ struct theme {
enum lab_justification window_label_text_justify;
enum lab_justification menu_title_text_justify;
/* button width */
/* buttons */
int window_button_width;
/* the space between buttons */
int window_button_height;
int window_button_spacing;
/* the shape of the hover effect */
enum lab_shape window_button_hover_bg_shape;