[metacity] theme (gtk+): fix missing border on windows
- From: Alberts MuktupÄvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] theme (gtk+): fix missing border on windows
- Date: Wed, 15 Apr 2015 13:15:54 +0000 (UTC)
commit 283e19a9a4df8209db58958709957ab5a46bf7ea
Author: Alberts MuktupÄvels <alberts muktupavels gmail com>
Date: Wed Apr 15 15:35:47 2015 +0300
theme (gtk+): fix missing border on windows
If windows are not resizable then invisible border is set to 0.
This is problem with GTK+ themes because border (box-shadow) is in
invisible area.
src/ui/theme.c | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 927b2a5..8532080 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -417,6 +417,7 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
MetaFrameBorders *borders)
{
int buttons_height, title_height;
+ MetaTheme *current;
meta_frame_borders_clear (borders);
@@ -440,18 +441,30 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
borders->visible.right = layout->right_width;
borders->visible.bottom = layout->bottom_height;
- if (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE)
+ current = meta_theme_get_current ();
+
+ if (current->is_gtk_theme == TRUE)
{
borders->invisible.left = layout->invisible_border.left;
borders->invisible.right = layout->invisible_border.right;
+ borders->invisible.bottom = layout->invisible_border.bottom;
+ borders->invisible.top = layout->invisible_border.top;
}
-
- if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE)
+ else
{
- borders->invisible.bottom = layout->invisible_border.bottom;
+ if (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE)
+ {
+ borders->invisible.left = layout->invisible_border.left;
+ borders->invisible.right = layout->invisible_border.right;
+ }
- if (type != META_FRAME_TYPE_ATTACHED)
- borders->invisible.top = layout->invisible_border.top;
+ if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE)
+ {
+ borders->invisible.bottom = layout->invisible_border.bottom;
+
+ if (type != META_FRAME_TYPE_ATTACHED)
+ borders->invisible.top = layout->invisible_border.top;
+ }
}
borders->total.left = borders->invisible.left + borders->visible.left;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]