diff --git a/data/Application.css b/data/Application.css index 26b8e023..fdb33af3 100644 --- a/data/Application.css +++ b/data/Application.css @@ -20,10 +20,6 @@ navigation-view-page > box { border-spacing: 2em; } -.header-area { - border-spacing: 0.25em; -} - .header-area image.large-icons { -gtk-icon-size: 64px; } @@ -31,11 +27,6 @@ navigation-view-page > box { .header-area image.normal-icons { -gtk-icon-size: 32px; } - -.header-area overlay { - margin-bottom: 0.5em; -} - .content-area { border-spacing: 1em; } diff --git a/src/Views/AbstractOnboardingView.vala b/src/Views/AbstractOnboardingView.vala index 3b090ed7..e089aa99 100644 --- a/src/Views/AbstractOnboardingView.vala +++ b/src/Views/AbstractOnboardingView.vala @@ -41,28 +41,35 @@ public abstract class Onboarding.AbstractOnboardingView : Adw.NavigationPage { }; overlay.add_overlay (badge); - var title_label = new Gtk.Label (title) { + var header_label = new Granite.HeaderLabel (title) { halign = CENTER, - justify = CENTER, - wrap = true, - max_width_chars = 50, - use_markup = true + // justify = CENTER, + // max_width_chars = 50, + size = H1, + secondary_text = description }; - title_label.add_css_class (Granite.STYLE_CLASS_H1_LABEL); - var description_label = new Gtk.Label (description) { - halign = CENTER, - justify = CENTER, - wrap = true, - max_width_chars = 50, - use_markup = true - }; - description_label.add_css_class (Granite.CssClass.DIM); - - var header_area = new Gtk.Box (VERTICAL, 0); + // var title_label = new Gtk.Label (title) { + // halign = CENTER, + // justify = CENTER, + // wrap = true, + // max_width_chars = 50, + // use_markup = true + // }; + // title_label.add_css_class (Granite.STYLE_CLASS_H1_LABEL); + + // var description_label = new Gtk.Label (description) { + // halign = CENTER, + // justify = CENTER, + // wrap = true, + // max_width_chars = 50, + // use_markup = true + // }; + // description_label.add_css_class (Granite.CssClass.DIM); + + var header_area = new Granite.Box (VERTICAL, HALF); header_area.append (overlay); - header_area.append (title_label); - header_area.append (description_label); + header_area.append (header_label); header_area.add_css_class ("header-area"); custom_bin = new Gtk.Box (VERTICAL, 0) { @@ -126,8 +133,8 @@ public abstract class Onboarding.AbstractOnboardingView : Adw.NavigationPage { {title, description} ); - bind_property ("description", description_label, "label"); - bind_property ("title", title_label, "label"); + bind_property ("description", header_label, "secondary-text"); + bind_property ("title", header_label, "label"); // Grab focus early so we don't interupt the screen reader showing.connect (() => next_button.grab_focus ());