Commit 17c3b811 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

carousel: display one page at a time

parent a92c89a7
......@@ -44,6 +44,7 @@ impl ImagePageWidget {
}
fn init(&self) {
self.widget.set_property_expand(true);
self.widget.set_halign(gtk::Align::Fill);
self.widget.set_valign(gtk::Align::Fill);
......
......@@ -4,13 +4,14 @@ use libhandy::prelude::HeaderBarExt;
pub struct WelcomePageWidget {
pub widget: gtk::Box,
handle: libhandy::WindowHandle,
}
impl WelcomePageWidget {
pub fn new() -> Self {
let widget = gtk::Box::new(gtk::Orientation::Vertical, 0);
let welcome_page = Self { widget };
let handle = libhandy::WindowHandle::new();
let welcome_page = Self { widget, handle };
welcome_page.init();
welcome_page
......@@ -71,7 +72,9 @@ impl WelcomePageWidget {
headerbar.set_show_close_button(true);
headerbar.set_title(Some(&gettext("Welcome Tour")));
self.widget.add(&headerbar);
self.handle.add(&headerbar);
self.widget.add(&self.handle);
self.widget.add(&container);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment