[metacity] theme: Attached modal dialogs should have no top invisible border
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] theme: Attached modal dialogs should have no top invisible border
- Date: Tue, 20 Jan 2015 21:37:40 +0000 (UTC)
commit 21e664afe03ad12484a2f4e117ee00943aabd816
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Sep 14 19:06:02 2011 -0400
theme: Attached modal dialogs should have no top invisible border
If we do this, then there will be invisible borders around the top of attached
modal dialogs, which is unnecessary -- they can't be resized from the top
border and just interfere with the parent dialog.
This requires changing a bit of API to help identify the type of dialog.
https://bugzilla.gnome.org/show_bug.cgi?id=657795
src/ui/theme.c | 9 +++++++++
src/ui/theme.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index ca9944c..dbf6625 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -405,6 +405,7 @@ void
meta_frame_layout_get_borders (const MetaFrameLayout *layout,
int text_height,
MetaFrameFlags flags,
+ MetaFrameType type,
MetaFrameBorders *borders)
{
int buttons_height, title_height;
@@ -439,6 +440,9 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
borders->invisible.bottom = layout->invisible_border.bottom;
borders->invisible.top = layout->invisible_border.top;
+ if (type == META_FRAME_TYPE_ATTACHED)
+ borders->invisible.top = 0;
+
borders->total.left = borders->invisible.left + borders->visible.left;
borders->total.right = borders->invisible.right + borders->visible.right;
borders->total.bottom = borders->invisible.bottom + borders->visible.bottom;
@@ -617,6 +621,7 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
int client_width,
int client_height,
const MetaButtonLayout *button_layout,
+ MetaFrameType type,
MetaFrameGeometry *fgeom,
MetaTheme *theme)
{
@@ -642,6 +647,7 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
meta_frame_layout_get_borders (layout, text_height,
flags,
+ type,
&borders);
fgeom->borders = borders;
@@ -5455,6 +5461,7 @@ meta_theme_draw_frame (MetaTheme *theme,
flags,
client_width, client_height,
button_layout,
+ type,
&fgeom,
theme);
@@ -5491,6 +5498,7 @@ meta_theme_get_frame_borders (MetaTheme *theme,
meta_frame_layout_get_borders (style->layout,
text_height,
flags,
+ type,
borders);
}
@@ -5519,6 +5527,7 @@ meta_theme_calc_geometry (MetaTheme *theme,
flags,
client_width, client_height,
button_layout,
+ type,
fgeom,
theme);
}
diff --git a/src/ui/theme.h b/src/ui/theme.h
index e8b9498..b4eca89 100644
--- a/src/ui/theme.h
+++ b/src/ui/theme.h
@@ -874,6 +874,7 @@ void meta_frame_layout_unref (MetaFrameLayout *layout)
void meta_frame_layout_get_borders (const MetaFrameLayout *layout,
int text_height,
MetaFrameFlags flags,
+ MetaFrameType type,
MetaFrameBorders *borders);
gboolean meta_frame_layout_validate (const MetaFrameLayout *layout,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]