Visual tweaks, and other minor stuff.
Added margins bottom margins on EpisodesView and ShowWidget. Added some comment's to the code. Silenced needless_pass_by_value clippy warning. Updated TODO.md.
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin_top">24</property>
|
||||
<property name="margin_bottom">24</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">24</property>
|
||||
<child>
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin_top">24</property>
|
||||
<property name="margin_bottom">24</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
@@ -42,6 +44,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">24</property>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
@@ -191,7 +194,6 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">24</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clone_on_ref_ptr))]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clone_on_ref_ptr, needless_pass_by_value))]
|
||||
|
||||
extern crate gdk;
|
||||
extern crate gdk_pixbuf;
|
||||
|
||||
@@ -68,7 +68,13 @@ lazy_static! {
|
||||
};
|
||||
}
|
||||
|
||||
// FIXME: use something that would just scale?
|
||||
// Since gdk_pixbuf::Pixbuf is refference counted and every episode,
|
||||
// use the cover of the Podcast Feed/Show, We can only create a Pixbuf
|
||||
// cover per show and pass around the Rc pointer.
|
||||
//
|
||||
// GObjects do not implement Send trait, so SendCell is a way around that.
|
||||
// Also lazy_static requires Sync trait, so that's what the mutexes are.
|
||||
// TODO: maybe use something that would just scale to requested size?
|
||||
pub fn get_pixbuf_from_path(pd: &PodcastCoverQuery, size: u32) -> Option<Pixbuf> {
|
||||
let mut hashmap = CACHED_PIXBUFS.lock().unwrap();
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user