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
5 changes: 0 additions & 5 deletions data/styles/ReleaseRow.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
release {
border-spacing: rem(6px);
padding: 1em;

box.header {
border-spacing: rem(6px);
}
}
24 changes: 4 additions & 20 deletions src/Views/AppInfoView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public class AppCenter.Views.AppInfoView : Adw.NavigationPage {
private GLib.ListStore origin_liststore;
private Gtk.CssProvider accent_provider;
private Gtk.DropDown origin_dropdown;
private Gtk.Label app_subtitle;
private Gtk.Overlay screenshot_overlay;
private Adw.Carousel screenshot_carousel;
private Adw.Clamp screenshot_not_found_clamp;
Expand Down Expand Up @@ -140,24 +139,10 @@ public class AppCenter.Views.AppInfoView : Adw.NavigationPage {
package = package
};

var app_title = new Gtk.Label (package.name) {
can_focus = false,
selectable = true,
wrap = true,
xalign = 0
};
app_title.add_css_class (Granite.STYLE_CLASS_H1_LABEL);

app_subtitle = new Gtk.Label (null) {
can_focus = false,
label = package.get_summary (),
selectable = true,
wrap = true,
wrap_mode = Pango.WrapMode.WORD_CHAR,
xalign = 0
var app_title = new Granite.HeaderLabel (package.name) {
secondary_text = package.get_summary (),
size = H1
};
app_subtitle.add_css_class (Granite.STYLE_CLASS_H3_LABEL);
app_subtitle.add_css_class (Granite.CssClass.DIM);

origin_liststore = new GLib.ListStore (typeof (AppCenterCore.Package));

Expand All @@ -184,8 +169,7 @@ public class AppCenter.Views.AppInfoView : Adw.NavigationPage {
column_spacing = 12,
valign = Gtk.Align.CENTER
};
header_grid.attach (app_title, 0, 0);
header_grid.attach (app_subtitle, 0, 1, 2);
header_grid.attach (app_title, 0, 0, 1, 2);
header_grid.attach (origin_dropdown, 0, 2, 2);

if (!package.is_local) {
Expand Down
5 changes: 3 additions & 2 deletions src/Views/CategoryView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,10 @@ public class AppCenter.CategoryView : Adw.NavigationPage {

if (label != null) {
var header = new Granite.HeaderLabel (label) {
margin_start = 12
margin_start = 12,
size = H2
};
header.add_css_class (Granite.STYLE_CLASS_H2_LABEL);

append (header);
}
append (flowbox);
Expand Down
13 changes: 6 additions & 7 deletions src/Widgets/ReleaseRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Authored by: Adam Bieńkowski <donadigos159@gmail.com>
*/

public class AppCenter.Widgets.ReleaseRow : Gtk.Box {
public class AppCenter.Widgets.ReleaseRow : Granite.Box {
public AppStream.Release release { get; construct; }

public ReleaseRow (AppStream.Release release) {
Expand All @@ -31,10 +31,9 @@ public class AppCenter.Widgets.ReleaseRow : Gtk.Box {
construct {
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
var header_label = new Granite.HeaderLabel (format_version (release.get_version ())) {
size = H3
};
header_label.add_css_class (Granite.STYLE_CLASS_H3_LABEL);

var date_label = new Gtk.Label (format_date (release.get_timestamp ())) {
halign = END,
Expand All @@ -50,12 +49,12 @@ public class AppCenter.Widgets.ReleaseRow : Gtk.Box {
xalign = 0
};

var header_box = new Gtk.Box (HORIZONTAL, 0);
header_box.add_css_class ("header");
var header_box = new Granite.Box (HORIZONTAL, HALF);
header_box.append (header_icon);
header_box.append (header_label);
header_box.append (date_label);

child_spacing = HALF;
orientation = VERTICAL;
append (header_box);
append (description_label);
Expand Down Expand Up @@ -100,7 +99,7 @@ public class AppCenter.Widgets.ReleaseRow : Gtk.Box {

private string format_version (string version) {
if (version != null) {
return "<b>%s</b>".printf (version);
return version;
} else {
return _("Unknown version");
}
Expand Down