Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions data/Application.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
-gtk-icon-style: symbolic;
}


/*FIXME: Remove after Granite 7.7.0*/
.numeric {
font-feature-settings: "tnum";
}

@keyframes rainbow-bg {
from {
background-image: linear-gradient(
Expand Down
5 changes: 3 additions & 2 deletions src/Views/ProgressView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ public class ProgressView : Adw.NavigationPage {
terminal_button.add_css_class (Granite.STYLE_CLASS_FLAT);

progressbar_label = new Gtk.Label (null) {
use_markup = true,
xalign = 0
};
progressbar_label.add_css_class (Granite.STYLE_CLASS_DIM_LABEL);
// FIXME: use granite constant when Granite 7.7.0 is released
progressbar_label.add_css_class ("numeric");

progressbar = new Gtk.ProgressBar () {
hexpand = true
Expand Down Expand Up @@ -240,7 +241,7 @@ public class ProgressView : Adw.NavigationPage {
break;
}

progressbar_label.label = "<span font-features='tnum'>%s (%d%%)</span>".printf (step_string, status.percent);
Comment thread
tintou marked this conversation as resolved.
progressbar_label.label = "%s (%d%%)".printf (step_string, status.percent);
progressbar.fraction = fraction;
return GLib.Source.REMOVE;
});
Expand Down
17 changes: 8 additions & 9 deletions src/Views/SuccessView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ public class SuccessView : AbstractInstallerView {
primary_label.add_css_class (Granite.STYLE_CLASS_H3_LABEL);

secondary_label = new Gtk.Label (null) {
use_markup = true,
wrap = true,
xalign = 0
};
// FIXME: use granite constant when Granite 7.7.0 is released
secondary_label.add_css_class ("numeric");

var message_grid = new Gtk.Grid () {
row_spacing = 6,
Expand Down Expand Up @@ -84,13 +85,11 @@ public class SuccessView : AbstractInstallerView {
}

private void update_secondary_label () {
secondary_label.label = "<span font-features='tnum'>%s</span>".printf (
ngettext (
"Your device will automatically restart in %i second.",
"Your device will automatically restart in %i seconds.",
seconds_remaining
).printf (seconds_remaining) + " " +
_("After restarting you can set up a new user, or you can shut down now and set up a new user later.")
);
secondary_label.label = ngettext (
"Your device will automatically restart in %i second.",
"Your device will automatically restart in %i seconds.",
seconds_remaining
).printf (seconds_remaining) + " " +
_("After restarting you can set up a new user, or you can shut down now and set up a new user later.");
}
}