[libadwaita/libadwaita-1-1] fading-label: Round label bounds
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/libadwaita-1-1] fading-label: Round label bounds
- Date: Wed, 3 Aug 2022 10:03:33 +0000 (UTC)
commit 22716becd83a45d93837cbb85821242f7b9447f7
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)
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 e9a685e1..9733200e 100644
--- a/src/adw-fading-label.c
+++ b/src/adw-fading-label.c
@@ -150,7 +150,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]