[libadwaita/libadwaita-1-0] fading-label: Round label bounds



commit bf8d3e14fe5e124fa78cfc9ac15485afaaf63d60
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Aug 3 13:56:30 2022 +0400

    fading-label: Round label bounds
    
    Prevent squished or clipped text with gtk-hint-font-metrics=0.
    
    Fixes https://gitlab.gnome.org/GNOME/libadwaita/-/issues/533
    
    
    (cherry picked from commit 8ef55c7701fc3a8464c260d33d1d312227a5b4ed)
    
    (cherry picked from commit 22716becd83a45d93837cbb85821242f7b9447f7)

 src/adw-fading-label.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/adw-fading-label.c b/src/adw-fading-label.c
index 08d0cf01..0b99be46 100644
--- a/src/adw-fading-label.c
+++ b/src/adw-fading-label.c
@@ -148,7 +148,9 @@ adw_fading_label_snapshot (GtkWidget   *widget,
 
   gsk_render_node_get_bounds (node, &bounds);
   bounds.origin.x = 0;
+  bounds.origin.y = floor (bounds.origin.y);
   bounds.size.width = width;
+  bounds.size.height = ceil (bounds.size.height);
 
   ensure_shader (self);
 


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