mirror of
https://github.com/brl/mutter.git
synced 2025-04-14 22:29:39 +00:00
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
This commit is contained in:
parent
f3bb16f301
commit
4a5c7ee4cc
@ -925,6 +925,7 @@ void meta_frame_layout_unref (MetaFrameLayout *layout)
|
|||||||
void meta_frame_layout_get_borders (const MetaFrameLayout *layout,
|
void meta_frame_layout_get_borders (const MetaFrameLayout *layout,
|
||||||
int text_height,
|
int text_height,
|
||||||
MetaFrameFlags flags,
|
MetaFrameFlags flags,
|
||||||
|
MetaFrameType type,
|
||||||
MetaFrameBorders *borders);
|
MetaFrameBorders *borders);
|
||||||
void meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
|
void meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
|
||||||
int text_height,
|
int text_height,
|
||||||
@ -932,6 +933,7 @@ void meta_frame_layout_calc_geometry (const MetaFrameLayout *layout
|
|||||||
int client_width,
|
int client_width,
|
||||||
int client_height,
|
int client_height,
|
||||||
const MetaButtonLayout *button_layout,
|
const MetaButtonLayout *button_layout,
|
||||||
|
MetaFrameType type,
|
||||||
MetaFrameGeometry *fgeom,
|
MetaFrameGeometry *fgeom,
|
||||||
MetaTheme *theme);
|
MetaTheme *theme);
|
||||||
|
|
||||||
|
@ -401,6 +401,7 @@ void
|
|||||||
meta_frame_layout_get_borders (const MetaFrameLayout *layout,
|
meta_frame_layout_get_borders (const MetaFrameLayout *layout,
|
||||||
int text_height,
|
int text_height,
|
||||||
MetaFrameFlags flags,
|
MetaFrameFlags flags,
|
||||||
|
MetaFrameType type,
|
||||||
MetaFrameBorders *borders)
|
MetaFrameBorders *borders)
|
||||||
{
|
{
|
||||||
int buttons_height, title_height, draggable_borders;
|
int buttons_height, title_height, draggable_borders;
|
||||||
@ -441,6 +442,9 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
|
|||||||
* pixels to get a proper feel. */
|
* pixels to get a proper feel. */
|
||||||
borders->invisible.top = MAX (0, draggable_borders - 2);
|
borders->invisible.top = MAX (0, draggable_borders - 2);
|
||||||
|
|
||||||
|
if (type == META_FRAME_TYPE_ATTACHED)
|
||||||
|
borders->invisible.top = 0;
|
||||||
|
|
||||||
borders->total.left = borders->invisible.left + borders->visible.left;
|
borders->total.left = borders->invisible.left + borders->visible.left;
|
||||||
borders->total.right = borders->invisible.right + borders->visible.right;
|
borders->total.right = borders->invisible.right + borders->visible.right;
|
||||||
borders->total.bottom = borders->invisible.bottom + borders->visible.bottom;
|
borders->total.bottom = borders->invisible.bottom + borders->visible.bottom;
|
||||||
@ -612,6 +616,7 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
|
|||||||
int client_width,
|
int client_width,
|
||||||
int client_height,
|
int client_height,
|
||||||
const MetaButtonLayout *button_layout,
|
const MetaButtonLayout *button_layout,
|
||||||
|
MetaFrameType type,
|
||||||
MetaFrameGeometry *fgeom,
|
MetaFrameGeometry *fgeom,
|
||||||
MetaTheme *theme)
|
MetaTheme *theme)
|
||||||
{
|
{
|
||||||
@ -636,7 +641,7 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
|
|||||||
MetaFrameBorders borders;
|
MetaFrameBorders borders;
|
||||||
|
|
||||||
meta_frame_layout_get_borders (layout, text_height,
|
meta_frame_layout_get_borders (layout, text_height,
|
||||||
flags,
|
flags, type,
|
||||||
&borders);
|
&borders);
|
||||||
|
|
||||||
fgeom->borders = borders;
|
fgeom->borders = borders;
|
||||||
@ -5521,6 +5526,7 @@ meta_theme_draw_frame_with_style (MetaTheme *theme,
|
|||||||
flags,
|
flags,
|
||||||
client_width, client_height,
|
client_width, client_height,
|
||||||
button_layout,
|
button_layout,
|
||||||
|
type,
|
||||||
&fgeom,
|
&fgeom,
|
||||||
theme);
|
theme);
|
||||||
|
|
||||||
@ -5580,7 +5586,7 @@ meta_theme_get_frame_borders (MetaTheme *theme,
|
|||||||
|
|
||||||
meta_frame_layout_get_borders (style->layout,
|
meta_frame_layout_get_borders (style->layout,
|
||||||
text_height,
|
text_height,
|
||||||
flags,
|
flags, type,
|
||||||
borders);
|
borders);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5609,6 +5615,7 @@ meta_theme_calc_geometry (MetaTheme *theme,
|
|||||||
flags,
|
flags,
|
||||||
client_width, client_height,
|
client_width, client_height,
|
||||||
button_layout,
|
button_layout,
|
||||||
|
type,
|
||||||
fgeom,
|
fgeom,
|
||||||
theme);
|
theme);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user