Dim out secondary label of EpisodeWidget.
This commit is contained in:
parent
0ac78fcff1
commit
0c1e759a45
@ -6,6 +6,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
@ -27,7 +28,6 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Episode Title</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="ellipsize">end</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
@ -56,6 +56,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">1970/01/01</property>
|
||||
<property name="single_line_mode">True</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -65,10 +66,11 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<object class="GtkLabel" id="seperator1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="label" translatable="yes">·</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -81,6 +83,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="label" translatable="yes">42 min</property>
|
||||
<property name="single_line_mode">True</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -90,10 +93,11 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<object class="GtkLabel" id="seperator2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">·</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -106,6 +110,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">42 MB</property>
|
||||
<property name="single_line_mode">True</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -119,6 +124,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="label" translatable="yes">12 MB / 42 MB</property>
|
||||
<property name="single_line_mode">True</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
|
||||
@ -65,6 +65,22 @@ impl EpisodeWidget {
|
||||
let size: gtk::Label = builder.get_object("size_label").unwrap();
|
||||
let progress_label: gtk::Label = builder.get_object("progress_label").unwrap();
|
||||
|
||||
let sep1: gtk::Label = builder.get_object("seperator1").unwrap();
|
||||
let sep2: gtk::Label = builder.get_object("seperator2").unwrap();
|
||||
|
||||
// Dim(grey out) the labels.
|
||||
// If it's possible through glade, feel free to open a PR.
|
||||
duration
|
||||
.get_style_context()
|
||||
.map(|c| c.add_class("dim-label"));
|
||||
progress_label
|
||||
.get_style_context()
|
||||
.map(|c| c.add_class("dim-label"));
|
||||
date.get_style_context().map(|c| c.add_class("dim-label"));
|
||||
size.get_style_context().map(|c| c.add_class("dim-label"));
|
||||
sep1.get_style_context().map(|c| c.add_class("dim-label"));
|
||||
sep2.get_style_context().map(|c| c.add_class("dim-label"));
|
||||
|
||||
EpisodeWidget {
|
||||
container,
|
||||
progress,
|
||||
@ -92,7 +108,6 @@ impl EpisodeWidget {
|
||||
fn init(&self, episode: &mut EpisodeWidgetQuery, pd: &Podcast) {
|
||||
self.title.set_xalign(0.0);
|
||||
self.title.set_text(episode.title());
|
||||
self.progress.set_pulse_step(0.1);
|
||||
|
||||
let progress = self.progress.clone();
|
||||
timeout_add(200, move || {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user