Changed the flowbox cover and banners size to 256x256 px.

This commit is contained in:
Jordan Petridis
2017-11-03 09:28:44 +02:00
parent 79fb8c2290
commit 02ae6b4aef
5 changed files with 13 additions and 9 deletions
+9 -5
View File
@@ -3,8 +3,8 @@
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkBox" id="fb_child">
<property name="width_request">200</property>
<property name="height_request">200</property>
<property name="width_request">256</property>
<property name="height_request">256</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
@@ -44,12 +44,16 @@
<object class="GtkLabel" id="banner_label">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="halign">end</property>
<property name="valign">start</property>
<property name="margin_right">40</property>
<property name="margin_top">38</property>
<property name="label" translatable="yes">Num</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
<property name="track_visited_links">False</property>
<property name="xalign">0.87999999523162842</property>
<property name="yalign">0.14000000059604645</property>
<property name="xalign">1</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="index">2</property>
@@ -73,7 +77,7 @@
<property name="justify">center</property>
<property name="ellipsize">end</property>
<property name="single_line_mode">True</property>
<property name="max_width_chars">30</property>
<property name="max_width_chars">35</property>
</object>
<packing>
<property name="expand">False</property>
+1 -1
View File
@@ -43,7 +43,7 @@ fn build_ui(app: &gtk::Application) {
// Get the main window
let window = gtk::ApplicationWindow::new(app);
window.set_default_size(1050, 600);
window.set_default_size(1150, 650);
// Setup the Stack that will manage the switch between podcasts_view and podcast_widget.
let stack = podcasts_view::setup_stack(&db);
window.add(&stack);
+2 -2
View File
@@ -150,7 +150,7 @@ pub fn create_flowbox_child(db: &Database, pd: &Podcast) -> gtk::FlowBoxChild {
}
fn configure_banner(db: &Database, pd: &Podcast, banner: &gtk::Image, banner_title: &gtk::Label) {
let bann = Pixbuf::new_from_file_at_scale("assets/banner.png", 100, 100, true);
let bann = Pixbuf::new_from_file_at_scale("assets/banner.png", 256, 256, true);
if let Ok(b) = bann {
banner.set_from_pixbuf(&b);
@@ -186,7 +186,7 @@ pub fn on_flowbox_child_activate(db: &Database, stack: &gtk::Stack, parent: &Pod
fn get_pixbuf_from_path(img_path: Option<&str>, pd_title: &str) -> Option<Pixbuf> {
let img_path = downloader::cache_image(pd_title, img_path);
if let Some(i) = img_path {
Pixbuf::new_from_file_at_scale(&i, 200, 200, true).ok()
Pixbuf::new_from_file_at_scale(&i, 256, 256, true).ok()
} else {
None
}