From 546dae1e4f4ab1fd00a74345274d9806ddf86503 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Mon, 29 Aug 2022 20:22:17 +0530 Subject: [PATCH] room-history: Increase message line height Unfortuntely line height on multi-height labels is way too tight by default in GTK4, so we need to work around it in apps. One very visible instance of this is the message bodies in the timeline. I fixed issue by adding css line-height property on .room-history row css class. https://gitlab.gnome.org/GNOME/fractal/-/issues/1030 Part-of: --- data/resources/style.css | 4 ++++ src/components/label_with_widgets.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/data/resources/style.css b/data/resources/style.css index 43f83b24..85926f26 100644 --- a/data/resources/style.css +++ b/data/resources/style.css @@ -9,6 +9,10 @@ textview, text { font-weight: bold; } +.line-height { + line-height: 150%; +} + button.pill.large { padding: 12px 40px; } diff --git a/src/components/label_with_widgets.rs b/src/components/label_with_widgets.rs index aa889388..b13dd95e 100644 --- a/src/components/label_with_widgets.rs +++ b/src/components/label_with_widgets.rs @@ -96,6 +96,7 @@ mod imp { label.set_wrap_mode(pango::WrapMode::WordChar); label.set_xalign(0.0); label.set_valign(gtk::Align::Start); + label.add_css_class("line-height"); label.connect_notify_local( Some("label"), clone!(@weak obj => move |_, _| {