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
18 changes: 18 additions & 0 deletions data/Application.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,24 @@
}
}

list.background row {
border-radius: 0.5em;
transition: background 200ms ease-in-out;
}

list.background row + row {
margin-top: 1em;
}

list.background row:focus {
background: transparent;
color: inherit;
}

list.background row:focus-visible {
background: alpha(@text_color, 0.1);
}

navigation-view-page.partition levelbar block {
border-radius: 0.333em;
}
Expand Down
5 changes: 5 additions & 0 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ public class Installer.MainWindow : Gtk.ApplicationWindow, PantheonWayland.Exten
});

child.realize.connect (() => {
// Can't access Inspector
if (Installer.App.test_mode) {
return;
}

connect_to_shell ();
make_centered ();
});
Expand Down
39 changes: 34 additions & 5 deletions src/Views/CheckView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public class Installer.CheckView : AbstractInstallerView {
// Minimum 1GB
public const uint64 MINIMUM_MEMORY = 1 * ONE_GB;

private Gtk.Box message_box;
private Gtk.ListBox message_box;
public bool has_messages {
get {
return message_box.get_first_child () != null;
return message_box.get_row_at_index (0) != null;
}
}

Expand Down Expand Up @@ -70,10 +70,13 @@ public class Installer.CheckView : AbstractInstallerView {
);
specs_view.attach (get_comparison_grid (), 1, 2);

message_box = new Gtk.Box (VERTICAL, 32) {
message_box = new Gtk.ListBox () {
selection_mode = BROWSE,
valign = CENTER,
vexpand = true
};
message_box.add_css_class (Granite.STYLE_CLASS_RICH_LIST);
message_box.add_css_class (Granite.STYLE_CLASS_BACKGROUND);

title_area.append (image);
title_area.append (title_label);
Expand Down Expand Up @@ -173,10 +176,24 @@ public class Installer.CheckView : AbstractInstallerView {
}

private class CheckView : Gtk.Grid {
public string title { get; construct; }
public string description { get; construct; }
public string icon_name { get; construct; }

private Gtk.Grid grid;

public CheckView (string title, string description, string icon_name) {
Object (
title: title,
description: description,
icon_name: icon_name
);
}

construct {
var image = new Gtk.Image.from_icon_name (icon_name) {
icon_size = LARGE,
valign = Gtk.Align.START
valign = START
};

var title_label = new Gtk.Label (title) {
Expand All @@ -192,10 +209,22 @@ public class Installer.CheckView : AbstractInstallerView {
};

column_spacing = 12;

attach (image, 0, 0, 1, 2);
attach (title_label, 1, 0);
attach (description_label, 1, 1);

// prevent reading all descriptions immediately
title_label.set_accessible_role (PRESENTATION);
description_label.set_accessible_role (PRESENTATION);

// prevent titles from being skipped
map.connect (() => {
parent.update_property (
Gtk.AccessibleProperty.LABEL, title,
Gtk.AccessibleProperty.DESCRIPTION, description,
-1
);
});
}
}

Expand Down