Merge lp:~ecanuto/ubuntu/quantal/ubuntu-gnome-default-settings/lp1060123 into lp:ubuntu/quantal/ubuntu-gnome-default-settings

Proposed by Everaldo Canuto
Status: Merged
Merge reported by: Jeremy Bícha
Merged at revision: not available
Proposed branch: lp:~ecanuto/ubuntu/quantal/ubuntu-gnome-default-settings/lp1060123
Merge into: lp:ubuntu/quantal/ubuntu-gnome-default-settings
Diff against target: 281 lines (+15/-178)
1 file modified
lib/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.script (+15/-178)
To merge this branch: bzr merge lp:~ecanuto/ubuntu/quantal/ubuntu-gnome-default-settings/lp1060123
Reviewer Review Type Date Requested Status
Jeremy Bícha Approve
Review via email: mp+127780@code.launchpad.net

Description of the change

* Some plymouth theme cleanups.
* Fixed password prompt and display messages (LP: #1060123).

To post a comment you must log in.
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Thank you!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_off.png'
2Binary files lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_off.png 1970-01-01 00:00:00 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_off.png 2012-10-03 14:29:24 +0000 differ
3=== modified file 'lib/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.script'
4--- lib/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.script 2012-09-29 00:33:02 +0000
5+++ lib/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.script 2012-10-03 14:29:24 +0000
6@@ -28,10 +28,10 @@
7 text_colour.green = 1.0;
8 text_colour.blue = 1.0;
9
10-# Tinted text #988592
11-tinted_text_colour.red = 0.59;
12-tinted_text_colour.green = 0.52;
13-tinted_text_colour.blue = 0.57;
14+# Tinted text #e1e1e1
15+tinted_text_colour.red = 0.87;
16+tinted_text_colour.green = 0.87;
17+tinted_text_colour.blue = 0.87;
18
19 # Action Text - #ffffff - RGB 255 255 255
20 action_text_colour.red = 1.0;
21@@ -86,8 +86,8 @@
22 local.text_height;
23 local.min_height;
24
25- # Put the 1st line below the logo + some spacing
26- y = logo.y + logo.height + (progress_indicator.bullet_height * 7 ); # + logo_spacing;
27+ # Put the 1st line below the middle screen + some spacing
28+ y = (Window.GetY () + Window.GetHeight () / 2) + 100;
29
30 text_height = first_line_height * 7.5;
31
32@@ -95,8 +95,6 @@
33 if (y + text_height > min_height)
34 y = min_height - text_height;
35
36- if (y < progress_indicator.y + progress_indicator.height)
37- return progress_indicator.y + progress_indicator.height;
38 return y;
39 }
40
41@@ -159,8 +157,10 @@
42
43 #-----------------------------------------------------------------------------
44 # Background colour
45-# #2e3436 --> 0.25, 0.30, 0.41
46+# #133773 --> 0.07, 0.21, 0.44
47 #
48+Window.SetBackgroundTopColor (0.07, 0.21, 0.44);
49+Window.SetBackgroundBottomColor (0.07, 0.21, 0.44);
50
51 # Load the Backgrounds
52 screen_width = Window.GetWidth();
53@@ -181,9 +181,8 @@
54 if ((progress - global.fade_progress) >= (3.0*speed)) {
55 global.fade_progress = progress;
56 }
57-# DebugBottom("progress: " + progress + " " + (progress - global.fade_progress));
58+ #DebugBottom("progress: " + progress + " " + (progress - global.fade_progress));
59
60-
61 tmp_progress = (progress - global.fade_progress)/speed;
62 if (tmp_progress <= 1.0) {
63 bg_sprites[1].SetOpacity((1-tmp_progress));
64@@ -202,34 +201,8 @@
65 }
66 }
67
68-bits_per_pixel = Window.GetBitsPerPixel ();
69-if (bits_per_pixel == 4) {
70- logo_filename = "ubuntu_logo16.png";
71- progress_dot_off_filename = "progress_dot_off16.png";
72- progress_dot_on_filename = "progress_dot_on16.png";
73- password_field_filename = "password_field16.png";
74-} else {
75- logo_filename = "ubuntu_logo.png";
76- progress_dot_off_filename = "progress_dot_off.png";
77- progress_dot_on_filename = "progress_dot_on.png";
78- password_field_filename = "password_field.png";
79-}
80-
81-logo.image = Image (logo_filename);
82-logo.sprite = Sprite ();
83-#logo.sprite.SetImage (logo.image);
84-logo.width = logo.image.GetWidth ();
85-logo.height = logo.image.GetHeight ();
86-logo.x = Window.GetX () + Window.GetWidth () / 2 - logo.width / 2;
87-logo.y = Window.GetY () + Window.GetHeight () / 2 - logo.height;
88-logo.z = 1000;
89-logo.sprite.SetX (logo.x);
90-logo.sprite.SetY (logo.y);
91-logo.sprite.SetZ (logo.z);
92-logo.sprite.SetOpacity (1);
93-
94-# Spacing below the logo - in pixels
95-logo_spacing = logo.height * 4;
96+progress_dot_off_filename = "progress_dot_off.png";
97+password_field_filename = "password_field.png";
98
99 message_notification[0].image = ImageToTintedText ("");
100 message_notification[1].image = ImageToTintedText ("");
101@@ -237,16 +210,6 @@
102
103 status = "normal";
104
105-progress_indicator.bullet_off = Image (progress_dot_off_filename);
106-progress_indicator.bullet_on = Image (progress_dot_on_filename);
107-progress_indicator.bullet_width = progress_indicator.bullet_off.GetWidth ();
108-progress_indicator.bullet_height = progress_indicator.bullet_off.GetHeight ();
109-progress_indicator.bullet_hspacing = progress_indicator.bullet_width * 1.1;
110-progress_indicator.width = progress_indicator.bullet_width * 5;
111-progress_indicator.height = progress_indicator.bullet_height;
112-progress_indicator.y = logo.y + logo.height + (logo.height / 4);
113-progress_indicator.x = Window.GetX () + Window.GetWidth () / 2 - progress_indicator.width / 2; # logo.x + 26;
114-
115 # use a fixed string with ascending and descending stems to calibrate the
116 # bounding box for the first message, so the messages below don't move up
117 # and down according to *their* height.
118@@ -257,91 +220,10 @@
119 # a bit if needed.
120 top_of_the_text = TextYOffset();
121
122-#-----------------------------------------Logo functions------------------------------
123-
124-# Call this when updating the screen
125-fun draw_logo () {
126- logo.sprite.SetX (logo.x);
127- logo.sprite.SetY (logo.y);
128- logo.sprite.SetZ (logo.z);
129- logo.sprite.SetOpacity (1);
130-}
131
132
133 #-----------------------------------------Progress Indicator--------------------------
134-fun set_progress_indicator () {
135-
136-
137- # Here we assume that we can store half bullets on each half of the screen
138- # together with some spacing
139- local.x = progress_indicator.x;
140-
141- for (index = 0; index <= 4; index++) {
142- # Set the "off" bullets
143- #progress_indicator.bullets_off[index].sprite = Sprite (progress_indicator.bullet_off);
144- progress_indicator.bullets_off[index].sprite.SetPosition (local.x, progress_indicator.y, 1000);
145- progress_indicator.bullets_off[index].x = local.x;
146- progress_indicator.bullets_off[index].y = progress_indicator.y;
147- progress_indicator.bullets_off[index].sprite.SetOpacity (1);
148-
149- #local.debug_medium_string = "Progress indicator " + index + ": x = " + progress_indicator.bullets_off[index].x +
150- # ", y = " + progress_indicator.bullets_off[index].y + ", logo width = " + logo.width +
151- # ", logo height = " + logo.height + " " + screen_width + " " + screen_height;
152- #
153- #(index % 2) && DebugMedium (local.debug_medium_string) || DebugBottom (local.debug_medium_string);
154-
155- # Set the "on" bullets on top of the "off" bullets and make them transparent
156- #progress_indicator.bullets_on[index].sprite = Sprite (progress_indicator.bullet_on);
157- progress_indicator.bullets_on[index].x = progress_indicator.bullets_off[index].x;
158- progress_indicator.bullets_on[index].y = progress_indicator.bullets_off[index].y;
159- progress_indicator.bullets_on[index].sprite.SetPosition (progress_indicator.bullets_on[index].x, progress_indicator.bullets_on[index].y, 10000);
160- progress_indicator.bullets_on[index].sprite.SetOpacity (0);
161-
162- local.x += progress_indicator.bullet_hspacing;
163- }
164- #local.debug_string = "Progress indicator: x1 = " + progress_indicator.x + ", x2 = " + local.x + ", y = " + progress_indicator.y +
165- # ", x logo = " + logo.x + ", y logo = " + logo.y + ", indicator width = " + progress_indicator.width;
166- #Debug(progress_indicator.bullets_off[0].x);
167-}
168-
169-
170-# We have 2 bullets, one on top of the other:
171-# The white one is on top of the red one and the former should
172-# slowly fade so as to get a nice transition effect.
173-fun switch_on_bullet (bullets_off, bullets_on, bullet_number, opacity) {
174- local.x = bullets_on[bullet_number].x;
175- local.y = bullets_on[bullet_number].y;
176- local.z = bullets_on[bullet_number].z;
177-
178- # Hide the bullets which are off
179- bullets_off[bullet_number].sprite.SetOpacity (0);
180-
181- # Show the bullets which are on
182- bullets_on[bullet_number].sprite.SetPosition (local.x, local.y, local.z);
183- bullets_on[bullet_number].sprite.SetOpacity (opacity);
184-
185- # Bump the number of times we have switched on bullets
186- global.times_bullets_switched++;
187-}
188-
189-fun switch_off_bullets () {
190- # Debug("Switching off progress indicator");
191-
192- set_progress_indicator ();
193- global.times_bullets_switched = 0;
194- global.on_off = 1;
195-}
196-
197-# This is something that we can call when we exit
198-fun switch_on_bullets () {
199- # Debug("Switching off progress indicator");
200- if (!global.progress_indicator.bullets_on) set_progress_indicator ();
201- local = global.progress_indicator;
202-
203- for (index = 0; bullets_on[index]; index++) {
204- switch_on_bullet (bullets_off, bullets_on, index, 1.0);
205- }
206-}
207+
208
209
210 # Implement in boot progress callback
211@@ -354,50 +236,6 @@
212 global.update_counter = 0;
213 animate_bg(progress);
214 }
215-
216- if (global.progress_time == NULL) {
217- global.progress_time = progress; #time;
218- switch_off_bullets ();
219- }
220-
221-# Debug ("progress = " + progress + ", time = " + time + " times switched = " + global.times_bullets_switched + " on_off " + global.on_off);
222-
223-# if (global.times_bullets_switched == NULL)
224-# global.times_bullets_switched = 5;
225-
226-# if (global.on_off == NULL)
227-# global.on_off = 0;
228-
229- if ((progress - global.progress_time) >= 1.0) {
230- global.progress_time = progress;
231-
232- if (global.times_bullets_switched == 5) {
233- # Change which bullets are switched on
234- # and which ones are switched off
235- global.on_off = !global.on_off;
236- global.times_bullets_switched = 0;
237- }
238-
239- if (global.on_off) {
240- switch_on_bullet (progress_indicator.bullets_off, progress_indicator.bullets_on,
241- global.times_bullets_switched, 1.0);
242- }
243- else {
244- switch_on_bullet (progress_indicator.bullets_on, progress_indicator.bullets_off,
245- global.times_bullets_switched, 1.0);
246- }
247- }
248-
249-
250- # Start setting bullets to "on" with translucency
251-# for (index = 0; index <= 5; index++) {
252-# opacity = 0.0;
253-# while (opacity <= 1.0) {
254-# switch_on_bullet (progress_indicator.bullets_off, progress_indicator.bullets_on,
255-# index, opacity);
256-# opacity += 0.1;
257-# }
258-# }
259 }
260
261
262@@ -1063,7 +901,7 @@
263 #
264 fun refresh_callback ()
265 {
266- draw_logo ();
267+ # nothing to do
268 }
269 Plymouth.SetRefreshFunction (refresh_callback);
270
271@@ -1092,10 +930,9 @@
272 #----------------------------------------- Quit --------------------------------
273
274 # TODO: Maybe we should also hide any other dialog
275-# Show the logo and make the progress indicator look full when on exit
276+# Make the progress indicator look full when on exit
277 fun quit_callback ()
278 {
279- logo.sprite.SetOpacity (1);
280 switch_on_bullets ();
281 }
282

Subscribers

People subscribed via source and target branches