ShowsView: Move title to a tooltip, fix gresource, center flowbox halign.
This commit is contained in:
parent
0826514cbc
commit
e04de5a576
@ -35,24 +35,5 @@
|
|||||||
<property name="position">0</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="pd_title">
|
|
||||||
<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="ellipsize">end</property>
|
|
||||||
<property name="single_line_mode">True</property>
|
|
||||||
<property name="max_width_chars">33</property>
|
|
||||||
<property name="track_visited_links">False</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</interface>
|
</interface>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.20.1 -->
|
<!-- Generated with glade 3.20.2 -->
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.20"/>
|
<requires lib="gtk+" version="3.20"/>
|
||||||
<object class="GtkBox" id="fb_parent">
|
<object class="GtkBox" id="fb_parent">
|
||||||
@ -19,11 +19,11 @@
|
|||||||
<object class="GtkFlowBox" id="flowbox">
|
<object class="GtkFlowBox" id="flowbox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="halign">baseline</property>
|
<property name="halign">center</property>
|
||||||
<property name="valign">start</property>
|
<property name="valign">start</property>
|
||||||
<property name="homogeneous">True</property>
|
<property name="homogeneous">True</property>
|
||||||
<property name="column_spacing">5</property>
|
<property name="column_spacing">5</property>
|
||||||
<property name="row_spacing">2</property>
|
<property name="row_spacing">5</property>
|
||||||
<property name="max_children_per_line">20</property>
|
<property name="max_children_per_line">20</property>
|
||||||
<property name="selection_mode">none</property>
|
<property name="selection_mode">none</property>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<gresources>
|
<gresources>
|
||||||
<gresource prefix="/org/gnome/hammond/">
|
<gresource prefix="/org/gnome/hammond/">
|
||||||
<file>banner.png</file>
|
|
||||||
<file preprocess="xml-stripblanks">gtk/episode_widget.ui</file>
|
<file preprocess="xml-stripblanks">gtk/episode_widget.ui</file>
|
||||||
<file preprocess="xml-stripblanks">gtk/show_widget.ui</file>
|
<file preprocess="xml-stripblanks">gtk/show_widget.ui</file>
|
||||||
<file preprocess="xml-stripblanks">gtk/empty_view.ui</file>
|
<file preprocess="xml-stripblanks">gtk/empty_view.ui</file>
|
||||||
|
|||||||
@ -79,7 +79,6 @@ impl ShowsPopulated {
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct ShowsChild {
|
struct ShowsChild {
|
||||||
container: gtk::Box,
|
container: gtk::Box,
|
||||||
title: gtk::Label,
|
|
||||||
cover: gtk::Image,
|
cover: gtk::Image,
|
||||||
child: gtk::FlowBoxChild,
|
child: gtk::FlowBoxChild,
|
||||||
}
|
}
|
||||||
@ -89,7 +88,6 @@ impl Default for ShowsChild {
|
|||||||
let builder = gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/shows_child.ui");
|
let builder = gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/shows_child.ui");
|
||||||
|
|
||||||
let container: gtk::Box = builder.get_object("fb_child").unwrap();
|
let container: gtk::Box = builder.get_object("fb_child").unwrap();
|
||||||
let title: gtk::Label = builder.get_object("pd_title").unwrap();
|
|
||||||
let cover: gtk::Image = builder.get_object("pd_cover").unwrap();
|
let cover: gtk::Image = builder.get_object("pd_cover").unwrap();
|
||||||
|
|
||||||
let child = gtk::FlowBoxChild::new();
|
let child = gtk::FlowBoxChild::new();
|
||||||
@ -97,7 +95,6 @@ impl Default for ShowsChild {
|
|||||||
|
|
||||||
ShowsChild {
|
ShowsChild {
|
||||||
container,
|
container,
|
||||||
title,
|
|
||||||
cover,
|
cover,
|
||||||
child,
|
child,
|
||||||
}
|
}
|
||||||
@ -112,7 +109,7 @@ impl ShowsChild {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn init(&self, pd: &Podcast) {
|
fn init(&self, pd: &Podcast) {
|
||||||
self.title.set_text(pd.title());
|
self.container.set_tooltip_text(pd.title());
|
||||||
|
|
||||||
let cover = get_pixbuf_from_path(pd);
|
let cover = get_pixbuf_from_path(pd);
|
||||||
if let Some(img) = cover {
|
if let Some(img) = cover {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user