Commit d37ad844 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

Merge branch 'master' into 'wip/exalm/colors'

# Conflicts: # data/resources/style.css
parents 1c6db828 2abafa14
......@@ -8,19 +8,19 @@ edition = "2018"
video = ["gst_player", "gst"]
[dependencies]
gtk = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gtk4", version = "0.3", features= ["v4_2"]}
gtk = { package = "gtk4", version = "0.3", features= ["v4_2"]}
log = "0.4"
gettext-rs = { version = "0.6", features = ["gettext-system"] }
libadwaita = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs.git" }
libadwaita = "0.1.0-beta-1"
pretty_env_logger = "0.4"
[dependencies.gst_player]
git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git"
version = "0.17"
package = "gstreamer-player"
optional = true
[dependencies.gst]
git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git"
version = "0.17"
package = "gstreamer"
optional = true
.large-title {
font-weight: 300;
font-size: 24pt;
letter-spacing: 0.2rem;
}
.page-title {
font-weight: 600;
font-size: 20pt;
}
.page-body {
font-weight: 400;
font-size: 12pt;
}
.video {
opacity: 0;
}
......@@ -60,5 +47,3 @@ window .titlebar button {
background-position: center 30%;
animation: left-and-right 2s ease-in-out infinite alternate;
}
.last-page { }
.last-page .page-title, .last-page .page-body { }
use crate::config;
use crate::utils;
use crate::widgets::Window;
use gtk::gdk;
use gtk::gio::{self, prelude::*};
use gtk::glib::{self, clone};
use gtk::prelude::*;
......
......@@ -14,8 +14,14 @@ fn main() {
pretty_env_logger::init();
// Prepare i18n
setlocale(LocaleCategory::LcAll, "");
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
textdomain(GETTEXT_PACKAGE);
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR).expect(&format!(
"Unable to bind text domain for {}",
GETTEXT_PACKAGE
));
textdomain(GETTEXT_PACKAGE).expect(&format!(
"Unable to switch to text domain {}",
GETTEXT_PACKAGE
));
glib::set_application_name(&gettext("Tour"));
glib::set_prgname(Some("Tour"));
......
......@@ -48,7 +48,7 @@ impl ImagePageWidget {
.valign(gtk::Align::Center)
.margin_top(36)
.build();
head_label.add_css_class("page-title");
head_label.add_css_class("title-1");
container.append(&head_label);
let body_label = gtk::Label::builder()
......@@ -59,7 +59,6 @@ impl ImagePageWidget {
.valign(gtk::Align::Center)
.margin_top(12)
.build();
body_label.add_css_class("page-body");
container.append(&body_label);
self.widget.append(&clamp);
......
......@@ -158,7 +158,7 @@ impl WelcomePageWidget {
let title = gtk::Label::new(Some(&gettext("Start the Tour")));
title.set_margin_top(36);
title.add_css_class("page-title");
title.add_css_class("title-1");
container.append(&title);
let name = glib::os_info("NAME").unwrap_or_else(|| "GNOME".into());
......
......@@ -113,6 +113,8 @@ impl PaginatorWidget {
self.carousel_dots.set_carousel(Some(&self.carousel));
self.carousel.set_hexpand(true);
self.carousel.set_vexpand(true);
self.carousel
.set_scroll_params(&libadwaita::SpringParams::new(1.0, 0.5, 300.0));
self.carousel
.connect_position_notify(clone!(@weak p => move |_| {
......
use crate::utils::i18n_f;
use gettextrs::gettext;
use gtk::glib;
use gtk::prelude::*;
......@@ -96,8 +95,6 @@ impl Window {
.upcast::<gtk::Widget>(),
);
let name = glib::os_info("NAME").unwrap_or_else(|| "GNOME".into());
let version = glib::os_info("VERSION").unwrap_or_else(|| "".into());
let last_page = ImagePageWidget::new(
"/org/gnome/Tour/ready-to-go.svg",
gettext("That's it. Have a nice day!"),
......
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