podcasts/podcasts-gtk/resources/gtk/show_widget.ui
James Westman 8081990895 Improve show description UI
Instead of being a scroll window inside a scroll window, the show
description now shows just the first paragraph by default, then displays
a "Read More" button if there is more to the description. Clicking the
button reveals the rest.

Currently, to keep the button from glitching when updating it from the
size-allocate signal, a GtkRevealer with a transition-duration of
1 millisecond is used. It's a hacky workaround but I'm not quite sure
how to do it better.

Fixes #81
2019-12-08 19:26:25 +00:00

179 lines
7.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.0
Copyright (C) 2017 - 2018
This file is part of GNOME Podcasts.
GNOME Podcasts is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GNOME Podcasts is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNOME Podcasts. If not, see <http://www.gnu.org/licenses/>.
Authors:
Jordan Petridis
Tobias Bernard
-->
<interface domain="">
<requires lib="gtk+" version="3.22"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name GNOME Podcasts -->
<!-- interface-description A podcast client for the GNOME Desktop -->
<!-- interface-copyright 2017 - 2018 -->
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
<object class="GtkBox" id="sub_container">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">32</property>
<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">6</property>
<child>
<object class="GtkImage" id="cover">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">256</property>
<property name="icon_name">image-x-generic-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="HdyColumn">
<property name="visible">True</property>
<property name="maximum_width">600</property>
<child>
<object class="GtkStack" id="description_stack">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vhomogeneous">False</property>
<property name="transition_type">none</property>
<property name="interpolate_size">True</property>
<property name="margin">12</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">fill</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="description_short">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
<property name="wrap">True</property>
<property name="wrap_mode">word-char</property>
<property name="ellipsize">end</property>
<property name="lines">4</property>
</object>
</child>
<child>
<object class="GtkRevealer" id="description_button_revealer">
<property name="visible">True</property>
<property name="reveal_child">False</property>
<property name="transition_duration">1</property>
<child>
<object class="GtkButton" id="description_button">
<property name="label" translatable="yes">Read More</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="halign">center</property>
<property name="margin_top">12</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="name">short</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="description">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
<property name="wrap">True</property>
<property name="wrap_mode">word-char</property>
</object>
<packing>
<property name="name">full</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<child>
<object class="GtkListBox" id="episodes">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="selection_mode">none</property>
<property name="activate_on_single_click">False</property>
</object>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</interface>