diff options
author | Florian Müllner <[email protected]> | 2014-09-27 18:04:20 +0300 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2018-08-28 09:38:37 -0400 |
commit | 997488f903cef76143e5b0f19a906cbb549d5761 (patch) | |
tree | fad0a52ca3f6c00f332be467acbc3cf2ad4e8f3b /src/ui/theme.h | |
parent | 33c75c2a39c2f6da4a76a556e55f4a4a57aa7cd4 (diff) | |
download | marco-997488f903cef76143e5b0f19a906cbb549d5761.tar.bz2 marco-997488f903cef76143e5b0f19a906cbb549d5761.tar.xz |
theme: Add background functions for single buttons
With the existing background functions, single buttons can not be
styled separately - on the left side, the style of the left button
is picked, and the right button's style on the right side.
As theme authors may want to add rounded corners to button groups
as a whole, it makes sense to treat the case of a single button in
a group differently.
https://bugzilla.gnome.org/show_bug.cgi?id=635683
NOTE: Patch copied from mutter and adapted for metacity.
Diffstat (limited to 'src/ui/theme.h')
-rw-r--r-- | src/ui/theme.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ui/theme.h b/src/ui/theme.h index 6d0b4d16..e248b3b3 100644 --- a/src/ui/theme.h +++ b/src/ui/theme.h @@ -185,7 +185,7 @@ struct _MetaFrameGeometry /* used for a memset hack */ #define ADDRESS_OF_BUTTON_RECTS(fgeom) (((char*)(fgeom)) + G_STRUCT_OFFSET (MetaFrameGeometry, close_rect)) -#define LENGTH_OF_BUTTON_RECTS (G_STRUCT_OFFSET (MetaFrameGeometry, right_right_background) + sizeof (GdkRectangle) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect)) +#define LENGTH_OF_BUTTON_RECTS (G_STRUCT_OFFSET (MetaFrameGeometry, right_single_background) + sizeof (GdkRectangle) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect)) /* The button rects (if changed adjust memset hack) */ MetaButtonSpace close_rect; @@ -200,14 +200,14 @@ struct _MetaFrameGeometry MetaButtonSpace unstick_rect; #define MAX_MIDDLE_BACKGROUNDS (MAX_BUTTONS_PER_CORNER - 2) - GdkRectangle left_single_background; GdkRectangle left_left_background; GdkRectangle left_middle_backgrounds[MAX_MIDDLE_BACKGROUNDS]; GdkRectangle left_right_background; - GdkRectangle right_single_background; + GdkRectangle left_single_background; GdkRectangle right_left_background; GdkRectangle right_middle_backgrounds[MAX_MIDDLE_BACKGROUNDS]; GdkRectangle right_right_background; + GdkRectangle right_single_background; /* End of button rects (if changed adjust memset hack) */ /* Saved button layout */ @@ -595,9 +595,11 @@ typedef enum META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND, META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_LEFT_RIGHT_BACKGROUND, + META_BUTTON_TYPE_LEFT_SINGLE_BACKGROUND, META_BUTTON_TYPE_RIGHT_LEFT_BACKGROUND, META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND, + META_BUTTON_TYPE_RIGHT_SINGLE_BACKGROUND, META_BUTTON_TYPE_CLOSE, META_BUTTON_TYPE_MAXIMIZE, META_BUTTON_TYPE_MINIMIZE, |