From 6c023bfef700d45ce640c6d855ce9857c6d8ad21 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Thu, 14 Jul 2005 21:00:26 +0000 Subject: [PATCH] Patch from Ken Harris to provide a more lenient threshold for drawing 2005-07-14 Elijah Newren Patch from Ken Harris to provide a more lenient threshold for drawing rounded corners. Fixes #122065. * src/theme.c (meta_frame_layout_calc_geometry): use height + width > 5 instead of height > 3 && width > 3 as criterion --- ChangeLog | 8 ++++++++ src/theme.c | 24 +++++++++--------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5814205c..899291e87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-07-14 Elijah Newren + + Patch from Ken Harris to provide a more lenient threshold for + drawing rounded corners. Fixes #122065. + + * src/theme.c (meta_frame_layout_calc_geometry): use height + + width > 5 instead of height > 3 && width > 3 as criterion + 2005-07-13 Elijah Newren Fix a slight bug (causing possible miscoloring of parts of the diff --git a/src/theme.c b/src/theme.c index bc520a56f..0c65226ca 100644 --- a/src/theme.c +++ b/src/theme.c @@ -743,28 +743,22 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout, if (flags & META_FRAME_SHADED) min_size_for_rounding = 0; else - min_size_for_rounding = 3; + min_size_for_rounding = 5; 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->left_width >= min_size_for_rounding) - fgeom->top_left_corner_rounded = layout->top_left_corner_rounded; - if (fgeom->right_width >= min_size_for_rounding) - fgeom->top_right_corner_rounded = layout->top_right_corner_rounded; - } + if (fgeom->top_height + fgeom->left_width >= min_size_for_rounding) + fgeom->top_left_corner_rounded = layout->top_left_corner_rounded; + if (fgeom->top_height + 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->left_width >= min_size_for_rounding) - fgeom->bottom_left_corner_rounded = layout->bottom_left_corner_rounded; - if (fgeom->right_width >= min_size_for_rounding) - fgeom->bottom_right_corner_rounded = layout->bottom_right_corner_rounded; - } + if (fgeom->bottom_height + fgeom->left_width >= min_size_for_rounding) + fgeom->bottom_left_corner_rounded = layout->bottom_left_corner_rounded; + if (fgeom->bottom_height + fgeom->right_width >= min_size_for_rounding) + fgeom->bottom_right_corner_rounded = layout->bottom_right_corner_rounded; } MetaGradientSpec*