Merge lp:~elementary-apps/appcenter/appinfo-styles into lp:~elementary-apps/appcenter/appcenter

Proposed by Danielle Foré
Status: Merged
Approved by: Corentin Noël
Approved revision: 74
Merged at revision: 74
Proposed branch: lp:~elementary-apps/appcenter/appinfo-styles
Merge into: lp:~elementary-apps/appcenter/appcenter
Diff against target: 76 lines (+18/-12)
1 file modified
src/Views/AppInfoView.vala (+18/-12)
To merge this branch: bzr merge lp:~elementary-apps/appcenter/appinfo-styles
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+280382@code.launchpad.net

Commit message

Prettify the AppInfoView

Description of the change

App Info Page
* Set wrap on app summary
* Set line height on app description
* Set paragraph bottom margin on app description
* Adjust spacing around bullets
* Larger text and screenshot
* Center screenshot

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Views/AppInfoView.vala'
2--- src/Views/AppInfoView.vala 2015-12-10 21:37:09 +0000
3+++ src/Views/AppInfoView.vala 2015-12-12 08:07:21 +0000
4@@ -140,9 +140,9 @@
5 app_icon.pixel_size = 128;
6
7 app_screenshot = new Gtk.Image ();
8- app_screenshot.pixel_size = 200;
9+ app_screenshot.pixel_size = 256;
10 app_screenshot.icon_name = "image-x-generic";
11- app_screenshot.halign = Gtk.Align.END;
12+ app_screenshot.halign = Gtk.Align.CENTER;
13 app_screenshot.valign = Gtk.Align.CENTER;
14
15 app_name = new Gtk.Label (null);
16@@ -162,12 +162,18 @@
17 app_summary = new Gtk.Label (null);
18 ((Gtk.Misc) app_summary).xalign = 0;
19 app_summary.valign = Gtk.Align.START;
20- app_summary.get_style_context ().add_class ("h3");
21+ app_summary.get_style_context ().add_class ("dim-label");
22+ app_summary.get_style_context ().add_class ("h2");
23+ app_summary.wrap = true;
24+ app_summary.wrap_mode = Pango.WrapMode.WORD_CHAR;
25
26 app_description = new Gtk.TextView ();
27 app_description.expand = true;
28 app_description.editable = false;
29+ app_description.get_style_context ().add_class ("h3");
30 app_description.cursor_visible = false;
31+ app_description.pixels_below_lines = 16;
32+ app_description.pixels_inside_wrap = 3;
33 app_description.wrap_mode = Gtk.WrapMode.WORD_CHAR;
34
35 action_stack = new Gtk.Stack ();
36@@ -203,16 +209,16 @@
37 progress_grid.add (progress_label);
38 progress_grid.add (progress_bar);
39
40+ var content_grid = new Gtk.Grid ();
41+ content_grid.margin = 12;
42+ content_grid.orientation = Gtk.Orientation.VERTICAL;
43+ content_grid.add (app_screenshot);
44+ content_grid.add (app_description);
45+
46 var scrolled = new Gtk.ScrolledWindow (null, null);
47 scrolled.hscrollbar_policy = Gtk.PolicyType.NEVER;
48 scrolled.expand = true;
49- scrolled.add (app_description);
50-
51- var content_grid = new Gtk.Grid ();
52- content_grid.margin = 12;
53- content_grid.orientation = Gtk.Orientation.HORIZONTAL;
54- content_grid.add (scrolled);
55- content_grid.add (app_screenshot);
56+ scrolled.add (content_grid);
57
58 action_stack.add_named (button_grid, "buttons");
59 action_stack.add_named (progress_grid, "progress");
60@@ -222,7 +228,7 @@
61 attach (app_version, 2, 0, 1, 1);
62 attach (action_stack, 3, 0, 1, 1);
63 attach (app_summary, 1, 1, 3, 1);
64- attach (content_grid, 0, 2, 4, 1);
65+ attach (scrolled, 0, 2, 4, 1);
66 }
67
68 private void update_status () {
69@@ -309,7 +315,7 @@
70 case "ul":
71 for (unowned Xml.Node* iter2 = iter->children; iter2 != null; iter2 = iter2->next) {
72 if (iter2->type == Xml.ElementType.ELEMENT_NODE) {
73- app_description.buffer.text += "\t⦁ " + iter2->get_content () + "\n";
74+ app_description.buffer.text += " ⦁ " + iter2->get_content () + "\n";
75 }
76 }
77

Subscribers

People subscribed via source and target branches

to all changes: