mirror of
https://github.com/labwc/labwc.git
synced 2026-02-09 10:07:31 -05:00
ssd: add optional omnipresent button
This commit is contained in:
parent
186a07be9b
commit
b7bccc8026
12 changed files with 165 additions and 52 deletions
|
|
@ -327,6 +327,11 @@ static struct mouse_combos {
|
|||
.button = "Left",
|
||||
.event = "Click",
|
||||
.action = "ToggleShade",
|
||||
}, {
|
||||
.context = "Omnipresent",
|
||||
.button = "Left",
|
||||
.event = "Click",
|
||||
.action = "ToggleOmnipresent",
|
||||
}, {
|
||||
.context = "Maximize",
|
||||
.button = "Right",
|
||||
|
|
|
|||
|
|
@ -48,9 +48,18 @@ 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 */
|
||||
/* Button icons need to be swapped on shade or omnipresent toggles */
|
||||
bool was_shaded;
|
||||
bool was_omnipresent;
|
||||
|
||||
/*
|
||||
* Corners need to be (un)rounded when toggling tiling or
|
||||
* maximization, and the button needs to be swapped on
|
||||
* maximization toggles.
|
||||
*/
|
||||
bool was_maximized;
|
||||
bool was_tiled_not_maximized;
|
||||
|
||||
struct wlr_box geometry;
|
||||
struct ssd_state_title {
|
||||
char *text;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ enum ssd_part_type {
|
|||
LAB_SSD_BUTTON_ICONIFY,
|
||||
LAB_SSD_BUTTON_WINDOW_MENU,
|
||||
LAB_SSD_BUTTON_SHADE,
|
||||
LAB_SSD_BUTTON_OMNIPRESENT,
|
||||
LAB_SSD_PART_TITLEBAR,
|
||||
LAB_SSD_PART_TITLEBAR_CORNER_RIGHT,
|
||||
LAB_SSD_PART_TITLEBAR_CORNER_LEFT,
|
||||
|
|
|
|||
|
|
@ -55,11 +55,13 @@ struct theme {
|
|||
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_active_button_omnipresent_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];
|
||||
float window_inactive_button_omnipresent_unpressed_image_color[4];
|
||||
/* TODO: add pressed and hover colors for buttons */
|
||||
|
||||
int menu_item_padding_x;
|
||||
|
|
@ -118,6 +120,8 @@ struct theme {
|
|||
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_omnipresent_active_unpressed;
|
||||
struct lab_data_buffer *button_exclusive_active_unpressed;
|
||||
|
||||
struct lab_data_buffer *button_close_inactive_unpressed;
|
||||
struct lab_data_buffer *button_maximize_inactive_unpressed;
|
||||
|
|
@ -126,6 +130,8 @@ struct theme {
|
|||
struct lab_data_buffer *button_menu_inactive_unpressed;
|
||||
struct lab_data_buffer *button_shade_inactive_unpressed;
|
||||
struct lab_data_buffer *button_unshade_inactive_unpressed;
|
||||
struct lab_data_buffer *button_omnipresent_inactive_unpressed;
|
||||
struct lab_data_buffer *button_exclusive_inactive_unpressed;
|
||||
|
||||
/* hover variants are optional and may be NULL */
|
||||
struct lab_data_buffer *button_close_active_hover;
|
||||
|
|
@ -135,6 +141,8 @@ struct theme {
|
|||
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_omnipresent_active_hover;
|
||||
struct lab_data_buffer *button_exclusive_active_hover;
|
||||
|
||||
struct lab_data_buffer *button_close_inactive_hover;
|
||||
struct lab_data_buffer *button_maximize_inactive_hover;
|
||||
|
|
@ -143,6 +151,8 @@ struct theme {
|
|||
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 *button_omnipresent_inactive_hover;
|
||||
struct lab_data_buffer *button_exclusive_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