Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put the release notes description label inside a Gtk.Grid #2234

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
29 changes: 17 additions & 12 deletions src/Widgets/ReleaseRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ public class AppCenter.Widgets.ReleaseRow : Gtk.Box {
}

construct {
var header_icon = new Gtk.Image.from_icon_name ("tag-symbolic");
orientation = Gtk.Orientation.VERTICAL;
spacing = 6;
margin_bottom = 6;

var header_icon = new Gtk.Image.from_icon_name ("tag-symbolic");
var header_label = new Gtk.Label (format_version (release.get_version ())) {
use_markup = true
};
Expand All @@ -42,6 +45,16 @@ public class AppCenter.Widgets.ReleaseRow : Gtk.Box {
};
date_label.add_css_class (Granite.STYLE_CLASS_DIM_LABEL);

var header_grid = new Gtk.Grid () {
column_spacing = 6,
row_spacing = 6,
margin_bottom = 6
};
header_grid.attach (header_icon, 0, 0);
header_grid.attach (header_label, 1, 0);
header_grid.attach (date_label, 2, 0);
append (header_grid);

var description_label = new Gtk.Label (format_release_description (release.get_description ())) {
selectable = true,
use_markup = true,
Expand All @@ -51,23 +64,15 @@ public class AppCenter.Widgets.ReleaseRow : Gtk.Box {
};
description_label.add_css_class (Granite.STYLE_CLASS_H3_LABEL);

var grid = new Gtk.Grid () {
var description_grid = new Gtk.Grid () {
column_spacing = 6,
row_spacing = 6,
margin_bottom = 6
};
grid.attach (header_icon, 0, 0);
grid.attach (header_label, 1, 0);
grid.attach (date_label, 2, 0);
grid.attach (description_label, 0, 1, 3);

orientation = Gtk.Orientation.VERTICAL;
spacing = 6;

append (grid);
description_grid.attach (description_label, 0, 0);
append (description_grid);

var issues = release.get_issues ();

if (issues.length > 0) {
var issue_header = new Gtk.Label (_("Fixed Issues")) {
halign = Gtk.Align.START,
Expand Down
Loading