Merge lp:~danrabbit/pantheon-notify/ui-fixes into lp:~tombeckmann/pantheon-notify/trunk

Proposed by Danielle Foré
Status: Merged
Merged at revision: 17
Proposed branch: lp:~danrabbit/pantheon-notify/ui-fixes
Merge into: lp:~tombeckmann/pantheon-notify/trunk
Diff against target: 138 lines (+39/-12) (has conflicts)
3 files modified
data/notifications.css (+12/-6)
src/notification.vala (+17/-6)
src/pantheon-notify.vala (+10/-0)
Text conflict in src/notification.vala
Text conflict in src/pantheon-notify.vala
To merge this branch: bzr merge lp:~danrabbit/pantheon-notify/ui-fixes
Reviewer Review Type Date Requested Status
Tom Beckmann Pending
Review via email: mp+102980@code.launchpad.net

Description of the change

Just some UI fixes.

CSS - I'm just keeping the critical and low states the same as the normal ones for now. I'll come back and replace those with some good ones after I've had time to make some nice mocks. Adding -unico-inner-stroke for the top highlight and reverted the outer border to a single color stroke.

Text padding - Text should now have sane padding all the way around it and not run into the edge of the window in any way

Icons - Using the nice big 48px icons from the mockup for super easy recognition and for consistency with gtk.dialog

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 'data/notifications.css'
2--- data/notifications.css 2012-04-21 18:21:59 +0000
3+++ data/notifications.css 2012-04-21 19:53:20 +0000
4@@ -5,23 +5,29 @@
5 * {
6 /*-notify-shadow: 0px 2px 18px alpha (#000, 0.60);*/
7
8- border-radius: 4px;
9+ border-radius: 5px;
10 border-width: 1px;
11 border-style: solid;
12+ -unico-inner-stroke-width: 1px;
13
14 border-color: alpha (#000, 0.3);
15- border-top-color: #fbfbfb;
16+
17+ -unico-inner-stroke-gradient: -gtk-gradient (linear,
18+ left bottom, left top,
19+ from (alpha (#fff, 0.40)),
20+ color-stop (0.20, alpha (#fff, 0.10)),
21+ color-stop (0.80, alpha (#fff, 0.10)),
22+ to (#fff));
23
24- background-color: alpha (#f9f9f9, 0.9);
25+ background-color: alpha (#f8f8f8, 0.9);
26 }
27
28 /*low priority*/
29 .low {
30- background-color: alpha (#f9f9f9, 0.5);
31+ /*background-color: alpha (#f9f9f9, 0.5);*/
32 }
33
34 /*high priority*/
35 .critical {
36- background-color: alpha (#f50000, 0.9);
37- border-top-color: #f00;
38+ /*background-color: alpha (#f50000, 0.9);*/
39 }
40\ No newline at end of file
41
42=== modified file 'src/notification.vala'
43--- src/notification.vala 2012-04-21 19:46:06 +0000
44+++ src/notification.vala 2012-04-21 19:53:20 +0000
45@@ -90,9 +90,15 @@
46
47 text = new Clutter.Text.with_text ("", "");
48
49+ text.x = SHADOW + 60;
50 this.set_text (name, body);
51+<<<<<<< TREE
52 text.add_constraint (new Clutter.BindConstraint (draw, Clutter.BindCoordinate.HEIGHT, -SHADOW*2-5));
53 text.width = WIDTH - (text.x+SHADOW);
54+=======
55+ text.add_constraint (new Clutter.BindConstraint (draw, Clutter.BindCoordinate.HEIGHT, -SHADOW * 2 - 9));
56+ text.width = WIDTH - (text.x+SHADOW) - 6;
57+>>>>>>> MERGE-SOURCE
58 text.line_wrap = true;
59 text.line_wrap_mode = Pango.WrapMode.WORD_CHAR;
60 text.ellipsize = Pango.EllipsizeMode.END;
61@@ -117,12 +123,17 @@
62
63
64 text.y = SHADOW+8;
65+<<<<<<< TREE
66 tex.y = SHADOW+8;
67 tex.x = SHADOW+5;
68 text.x = tex.x + tex.width + 5;
69
70 category.x = WIDTH-(42+SHADOW);
71 category.y = tex.y;
72+=======
73+ tex.y = SHADOW+3;
74+ tex.x = SHADOW+3;
75+>>>>>>> MERGE-SOURCE
76
77 this.width = WIDTH;
78 this.reactive = true;
79@@ -234,21 +245,21 @@
80 } else {
81 try {
82 tex.set_from_icon_name (new Gtk.Image (),
83- hints.lookup ("image-path").get_string (), Gtk.IconSize.DND);
84+ hints.lookup ("image-path").get_string (), Gtk.IconSize.DIALOG);
85 } catch (Error e) { warning (e.message); }
86 }
87 } else if (icon != "") { /*app_icon*/
88 debug ("Using app icon");
89 try {
90- tex.set_from_icon_name (new Gtk.Image (), icon, Gtk.IconSize.DND);
91+ tex.set_from_icon_name (new Gtk.Image (), icon, Gtk.IconSize.DIALOG);
92 } catch (Error e) { //not an icon name? try a stock icon
93 try {
94 print ("Trying stock icon %s\n", icon);
95- tex.set_from_stock (new Gtk.Image (), icon, Gtk.IconSize.DND);
96+ tex.set_from_stock (new Gtk.Image (), icon, Gtk.IconSize.DIALOG);
97 } catch (Error e) { //still not? well... the app name perhaps?
98 try {
99 print ("Trying app icon %s\n", app);
100- tex.set_from_icon_name (new Gtk.Image (), app, Gtk.IconSize.DND);
101+ tex.set_from_icon_name (new Gtk.Image (), app, Gtk.IconSize.DIALOG);
102 } catch (Error e) { warning (e.message); } //hm...
103 }
104 }
105@@ -264,11 +275,11 @@
106 } else {
107 try { /*icon from the app perhaps?*/
108 debug ("Using app name");
109- tex.set_from_icon_name (new Gtk.Image (), app.down (), Gtk.IconSize.DND);
110+ tex.set_from_icon_name (new Gtk.Image (), app.down (), Gtk.IconSize.DIALOG);
111 } catch (Error e) {
112 debug ("Using fallback");
113 try { /*dialog-information icon as fallback*/
114- tex.set_from_icon_name (new Gtk.Image (), "dialog-information", Gtk.IconSize.DND);
115+ tex.set_from_icon_name (new Gtk.Image (), "dialog-information", Gtk.IconSize.DIALOG);
116 } catch (Error e) { warning (e.message); }
117 }
118 }
119
120=== modified file 'src/pantheon-notify.vala'
121--- src/pantheon-notify.vala 2012-04-21 19:45:28 +0000
122+++ src/pantheon-notify.vala 2012-04-21 19:53:20 +0000
123@@ -1,6 +1,16 @@
124
125+<<<<<<< TREE
126 public const int WIDTH = 300;
127 public const int HEIGHT = 76; //56+2*10px shadow
128+=======
129+public const string NOTIFY_STYLE = """
130+
131+""";
132+
133+// FIXME: Width and Height should automatically take shadow into account
134+public const int WIDTH = 320; //300 + (2 * 10)px shadow
135+public const int HEIGHT = 76; //56 + (2 * 10)px shadow
136+>>>>>>> MERGE-SOURCE
137 public const int SHADOW = 10;
138 public const int EXPIRE = 7000; //in ms
139

Subscribers

People subscribed via source and target branches

to all changes: