mirror of
https://github.com/labwc/labwc.git
synced 2026-02-06 04:06:33 -05:00
ssd: add optional shade button
This commit is contained in:
parent
9f2eae672c
commit
186a07be9b
11 changed files with 138 additions and 34 deletions
|
|
@ -322,6 +322,11 @@ static struct mouse_combos {
|
|||
.button = "Left",
|
||||
.event = "Click",
|
||||
.action = "ToggleMaximize",
|
||||
}, {
|
||||
.context = "Shade",
|
||||
.button = "Left",
|
||||
.event = "Click",
|
||||
.action = "ToggleShade",
|
||||
}, {
|
||||
.context = "Maximize",
|
||||
.button = "Right",
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ struct ssd {
|
|||
* don't update things we don't have to.
|
||||
*/
|
||||
struct {
|
||||
bool was_shaded; /* To toggle icon on shade */
|
||||
bool was_maximized; /* To un-round corner buttons and toggle icon on maximize */
|
||||
bool was_tiled_not_maximized; /* To un-round corner buttons */
|
||||
struct wlr_box geometry;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ enum ssd_part_type {
|
|||
LAB_SSD_BUTTON_MAXIMIZE,
|
||||
LAB_SSD_BUTTON_ICONIFY,
|
||||
LAB_SSD_BUTTON_WINDOW_MENU,
|
||||
LAB_SSD_BUTTON_SHADE,
|
||||
LAB_SSD_PART_TITLEBAR,
|
||||
LAB_SSD_PART_TITLEBAR_CORNER_RIGHT,
|
||||
LAB_SSD_PART_TITLEBAR_CORNER_LEFT,
|
||||
|
|
@ -100,7 +101,6 @@ enum ssd_part_type ssd_at(const struct ssd *ssd,
|
|||
enum ssd_part_type ssd_get_part_type(const struct ssd *ssd,
|
||||
struct wlr_scene_node *node);
|
||||
uint32_t ssd_resize_edges(enum ssd_part_type type);
|
||||
bool ssd_is_button(enum ssd_part_type type);
|
||||
bool ssd_part_contains(enum ssd_part_type whole, enum ssd_part_type candidate);
|
||||
enum ssd_mode ssd_mode_parse(const char *mode);
|
||||
|
||||
|
|
|
|||
|
|
@ -54,10 +54,12 @@ struct theme {
|
|||
float window_active_button_iconify_unpressed_image_color[4];
|
||||
float window_active_button_max_unpressed_image_color[4];
|
||||
float window_active_button_close_unpressed_image_color[4];
|
||||
float window_active_button_shade_unpressed_image_color[4];
|
||||
float window_inactive_button_menu_unpressed_image_color[4];
|
||||
float window_inactive_button_iconify_unpressed_image_color[4];
|
||||
float window_inactive_button_max_unpressed_image_color[4];
|
||||
float window_inactive_button_close_unpressed_image_color[4];
|
||||
float window_inactive_button_shade_unpressed_image_color[4];
|
||||
/* TODO: add pressed and hover colors for buttons */
|
||||
|
||||
int menu_item_padding_x;
|
||||
|
|
@ -114,12 +116,16 @@ struct theme {
|
|||
struct lab_data_buffer *button_restore_active_unpressed;
|
||||
struct lab_data_buffer *button_iconify_active_unpressed;
|
||||
struct lab_data_buffer *button_menu_active_unpressed;
|
||||
struct lab_data_buffer *button_shade_active_unpressed;
|
||||
struct lab_data_buffer *button_unshade_active_unpressed;
|
||||
|
||||
struct lab_data_buffer *button_close_inactive_unpressed;
|
||||
struct lab_data_buffer *button_maximize_inactive_unpressed;
|
||||
struct lab_data_buffer *button_restore_inactive_unpressed;
|
||||
struct lab_data_buffer *button_iconify_inactive_unpressed;
|
||||
struct lab_data_buffer *button_menu_inactive_unpressed;
|
||||
struct lab_data_buffer *button_shade_inactive_unpressed;
|
||||
struct lab_data_buffer *button_unshade_inactive_unpressed;
|
||||
|
||||
/* hover variants are optional and may be NULL */
|
||||
struct lab_data_buffer *button_close_active_hover;
|
||||
|
|
@ -127,12 +133,16 @@ struct theme {
|
|||
struct lab_data_buffer *button_restore_active_hover;
|
||||
struct lab_data_buffer *button_iconify_active_hover;
|
||||
struct lab_data_buffer *button_menu_active_hover;
|
||||
struct lab_data_buffer *button_shade_active_hover;
|
||||
struct lab_data_buffer *button_unshade_active_hover;
|
||||
|
||||
struct lab_data_buffer *button_close_inactive_hover;
|
||||
struct lab_data_buffer *button_maximize_inactive_hover;
|
||||
struct lab_data_buffer *button_restore_inactive_hover;
|
||||
struct lab_data_buffer *button_iconify_inactive_hover;
|
||||
struct lab_data_buffer *button_menu_inactive_hover;
|
||||
struct lab_data_buffer *button_shade_inactive_hover;
|
||||
struct lab_data_buffer *button_unshade_inactive_hover;
|
||||
|
||||
struct lab_data_buffer *corner_top_left_active_normal;
|
||||
struct lab_data_buffer *corner_top_right_active_normal;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue