[gnome-shell] st/theme-node-drawing: Fix inner shadow fast path condition



commit 9e86cdbe71b4bf60e3a8d1d46b6f64a6dc5c0b10
Author: Sebastian Keller <skeller gnome org>
Date:   Sun Feb 7 00:23:04 2021 +0100

    st/theme-node-drawing: Fix inner shadow fast path condition
    
    We want to use the fast path of filling the entire area if either the
    left and right shadows would overlap or the top and bottom shadows. The
    latter check was wrong due to a typo resulting in the regular path
    being used in some cases it couldn't (and shouldn't) handle.
    
    This was causing the inset shadow used to highlight panel buttons to
    not appear for buttons above a certain width.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1646>

 src/st/st-theme-node-drawing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c
index 6c52da839b..f839d990ed 100644
--- a/src/st/st-theme-node-drawing.c
+++ b/src/st/st-theme-node-drawing.c
@@ -928,7 +928,7 @@ paint_inset_box_shadow_to_cairo_context (StThemeNode     *node,
   shrunk_extents_x2 = extents_x2 + shadow_spec->xoffset - shadow_spec->spread;
   shrunk_extents_y2 = extents_y2 + shadow_spec->yoffset - shadow_spec->spread;
 
-  if (shrunk_extents_x1 >= shrunk_extents_x2 || shrunk_extents_y1 >= shrunk_extents_x2)
+  if (shrunk_extents_x1 >= shrunk_extents_x2 || shrunk_extents_y1 >= shrunk_extents_y2)
     {
       /* Shadow occupies entire area within border */
       shadow_pattern = cairo_pattern_create_rgb (0., 0., 0.);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]