ShowWidget: Fix description padding.

This commit is contained in:
Jordan Petridis 2018-07-21 19:41:15 +03:00
parent fc934ce8e1
commit 454a9c7076
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
2 changed files with 5 additions and 3 deletions

View File

@ -79,12 +79,13 @@ Tobias Bernard
<property name="margin_bottom">32</property>
<property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<property name="spacing">6</property>
<child>
<object class="GtkImage" id="cover">
<property name="visible">True</property>
@ -120,6 +121,7 @@ Sorry, we could not find a description for this Show.</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
<property name="wrap">True</property>
<property name="selectable">True</property>
<property name="max_width_chars">70</property>
</object>
</child>
@ -136,6 +138,7 @@ Sorry, we could not find a description for this Show.</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">6</property>
<property name="position">1</property>
</packing>
</child>
@ -143,7 +146,6 @@ Sorry, we could not find a description for this Show.</property>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">12</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>

View File

@ -85,7 +85,7 @@ impl ShowWidget {
/// Set the descripton text.
fn set_description(&self, text: &str) {
self.description
.set_markup(&html2text::from_read(text.as_bytes(), 70));
.set_markup(html2text::from_read(text.as_bytes(), 70).trim());
}
/// Save the scrollabar vajustment to the cache.