always apply rounding for shaded windows, fixes Bluecurve theme when

2002-08-27  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (meta_frame_layout_calc_geometry): always apply
	rounding for shaded windows, fixes Bluecurve theme when shaded
This commit is contained in:
Havoc Pennington 2002-08-28 02:48:59 +00:00 committed by Havoc Pennington
parent 5eddcaef89
commit 9e062cd7a8
2 changed files with 17 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2002-08-27 Havoc Pennington <hp@pobox.com>
* src/theme.c (meta_frame_layout_calc_geometry): always apply
rounding for shaded windows, fixes Bluecurve theme when shaded
2002-08-25 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_free): when freeing a fullscreen

View File

@ -403,6 +403,7 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
int title_right_edge;
int width, height;
int button_width, button_height;
int min_size_for_rounding;
meta_frame_layout_get_borders (layout, text_height,
flags,
@ -567,26 +568,29 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
fgeom->title_rect.height = 0;
}
#define MIN_SIZE_FOR_ROUNDING 3
if (flags & META_FRAME_SHADED)
min_size_for_rounding = 0;
else
min_size_for_rounding = 3;
fgeom->top_left_corner_rounded = FALSE;
fgeom->top_right_corner_rounded = FALSE;
fgeom->bottom_left_corner_rounded = FALSE;
fgeom->bottom_right_corner_rounded = FALSE;
if (fgeom->top_height >= MIN_SIZE_FOR_ROUNDING)
if (fgeom->top_height >= min_size_for_rounding)
{
if (fgeom->left_width >= MIN_SIZE_FOR_ROUNDING)
if (fgeom->left_width >= min_size_for_rounding)
fgeom->top_left_corner_rounded = layout->top_left_corner_rounded;
if (fgeom->right_width >= MIN_SIZE_FOR_ROUNDING)
if (fgeom->right_width >= min_size_for_rounding)
fgeom->top_right_corner_rounded = layout->top_right_corner_rounded;
}
if (fgeom->bottom_height >= MIN_SIZE_FOR_ROUNDING)
if (fgeom->bottom_height >= min_size_for_rounding)
{
if (fgeom->left_width >= MIN_SIZE_FOR_ROUNDING)
if (fgeom->left_width >= min_size_for_rounding)
fgeom->bottom_left_corner_rounded = layout->bottom_left_corner_rounded;
if (fgeom->right_width >= MIN_SIZE_FOR_ROUNDING)
if (fgeom->right_width >= min_size_for_rounding)
fgeom->bottom_right_corner_rounded = layout->bottom_right_corner_rounded;
}
}