Merge lp:~dobey/ubuntuone-control-panel/system-font into lp:ubuntuone-control-panel

Proposed by dobey
Status: Merged
Approved by: Natalia Bidart
Approved revision: 291
Merged at revision: 286
Proposed branch: lp:~dobey/ubuntuone-control-panel/system-font
Merge into: lp:ubuntuone-control-panel
Diff against target: 304 lines (+39/-57)
10 files modified
data/qt/controlpanel.ui (+0/-10)
data/qt/loadingoverlay.ui (+0/-5)
data/qt/preferences.ui (+3/-3)
data/qt/side_widget.ui (+25/-7)
data/qt/signin.ui (+0/-7)
data/qt/ubuntuone.qss (+2/-20)
ubuntuone/controlpanel/gui/qt/controlpanel.py (+2/-2)
ubuntuone/controlpanel/gui/qt/loadingoverlay.py (+3/-1)
ubuntuone/controlpanel/gui/qt/signin.py (+3/-1)
ubuntuone/controlpanel/gui/qt/tests/test_signin.py (+1/-1)
To merge this branch: bzr merge lp:~dobey/ubuntuone-control-panel/system-font
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Roberto Alsina (community) Approve
Review via email: mp+97094@code.launchpad.net

Commit message

Don't hard-code the font sizes

To post a comment you must log in.
284. By dobey

Link #942025 as it is inadvertently fixed here as well

Revision history for this message
Roberto Alsina (ralsina) wrote :

+1 with a cherry on top

review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

* As you can see here http://ubuntuone.com/2yQosMCmbymXDbMANMRXvR:
  - The text in the "side widget" overlaps to the right with the side widget's dotted vertical line
  - The welcome_label has to be bigger, perhaps x-large or xx-large

* As you can see here http://ubuntuone.com/2FtOqlLeQnivda6BHeh9tE:
  - The window from this branch is bigger than the window from trunk, which is an issue since we need to fit small screens. So, we need the window's height not ot be higher than 525px.
  - All the fonts looks a little bigger.

* The font for the "Getting info, please wait" is now much smaller than before.

* Since you're already modifying the NAME_STYLE and PERCENTAGE_STYLE constants, would you please make them unicode?

review: Needs Fixing
Revision history for this message
Roberto Alsina (ralsina) wrote :

I will do screenshots and email to design.

285. By Roberto Alsina

Fix the welcome page sidebar to auto-resize with text

286. By Diego Sarmentero

Fix some default spacer sizes

287. By dobey

Scrap a couple more missed font settings

288. By dobey

Make the loading overlay text big again

289. By dobey

Make the _STYLE strings be unicode

Revision history for this message
Roberto Alsina (ralsina) wrote :

> * As you can see here http://ubuntuone.com/2yQosMCmbymXDbMANMRXvR:
> - The text in the "side widget" overlaps to the right with the side widget's
> dotted vertical line
> - The welcome_label has to be bigger, perhaps x-large or xx-large
>
> * As you can see here http://ubuntuone.com/2FtOqlLeQnivda6BHeh9tE:
> - The window from this branch is bigger than the window from trunk, which is
> an issue since we need to fit small screens. So, we need the window's height
> not ot be higher than 525px.
> - All the fonts looks a little bigger.
>
> * The font for the "Getting info, please wait" is now much smaller than
> before.
>
> * Since you're already modifying the NAME_STYLE and PERCENTAGE_STYLE
> constants, would you please make them unicode?

I think all these are now fixed.

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Thanks for working on this!

The "welcome label" from the first screen (when the user has no credentials) is still very small compared to trunk.

Also, the text in the side widget is "touching" the dotted right separator... can we make the text wrap (this will benefit other languages that will have longer texts) and add a little padding to the right so the text does not reach the separator itself?

review: Needs Fixing
290. By dobey

Make the welcome text xx-large as well

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Got errors on test run:

[FAIL]
Traceback (most recent call last):
  File "/home/nessita/canonical/controlpanel/review_system-font/ubuntuone/controlpanel/gui/qt/tests/test_signin.py", line 51, in test_label_is_correct
    gui.WELCOME_LABEL)
  File "/usr/lib/python2.7/dist-packages/twisted/trial/unittest.py", line 270, in assertEqual
    % (msg, pformat(first), pformat(second)))
twisted.trial.unittest.FailTest: not equal:
a = u'<span style="font-size:xx-large;">Welcome to Ubuntu One!</span>'
b = u'Welcome to Ubuntu One!'

ubuntuone.controlpanel.gui.qt.tests.test_signin.SignInPanelTestCase.test_label_is_correct
-------------------------------------------------------------------------------
Ran 859 tests in 7.101s

FAILED (skips=2, failures=1, successes=856)

review: Needs Fixing
291. By dobey

Fix the broken broken test

Revision history for this message
dobey (dobey) wrote :

Fixed.

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/qt/controlpanel.ui'
2--- data/qt/controlpanel.ui 2012-03-08 20:46:13 +0000
3+++ data/qt/controlpanel.ui 2012-03-15 20:47:20 +0000
4@@ -139,11 +139,6 @@
5 </item>
6 <item>
7 <widget class="QLabel" name="quota_usage_label">
8- <property name="font">
9- <font>
10- <pointsize>8</pointsize>
11- </font>
12- </property>
13 <property name="text">
14 <string/>
15 </property>
16@@ -309,11 +304,6 @@
17 </item>
18 <item>
19 <widget class="QLabel" name="follow_us_label">
20- <property name="font">
21- <font>
22- <pointsize>11</pointsize>
23- </font>
24- </property>
25 <property name="text">
26 <string notr="true">Talk to us</string>
27 </property>
28
29=== modified file 'data/qt/loadingoverlay.ui'
30--- data/qt/loadingoverlay.ui 2012-02-22 15:35:13 +0000
31+++ data/qt/loadingoverlay.ui 2012-03-15 20:47:20 +0000
32@@ -52,11 +52,6 @@
33 <verstretch>0</verstretch>
34 </sizepolicy>
35 </property>
36- <property name="font">
37- <font>
38- <pointsize>14</pointsize>
39- </font>
40- </property>
41 <property name="text">
42 <string notr="true">Getting information, please wait...</string>
43 </property>
44
45=== modified file 'data/qt/preferences.ui'
46--- data/qt/preferences.ui 2012-03-08 20:46:13 +0000
47+++ data/qt/preferences.ui 2012-03-15 20:47:20 +0000
48@@ -7,7 +7,7 @@
49 <x>0</x>
50 <y>0</y>
51 <width>520</width>
52- <height>342</height>
53+ <height>311</height>
54 </rect>
55 </property>
56 <property name="windowTitle">
57@@ -98,7 +98,7 @@
58 <property name="sizeHint" stdset="0">
59 <size>
60 <width>40</width>
61- <height>20</height>
62+ <height>10</height>
63 </size>
64 </property>
65 </spacer>
66@@ -180,7 +180,7 @@
67 <property name="sizeHint" stdset="0">
68 <size>
69 <width>20</width>
70- <height>40</height>
71+ <height>10</height>
72 </size>
73 </property>
74 </spacer>
75
76=== modified file 'data/qt/side_widget.ui'
77--- data/qt/side_widget.ui 2012-03-01 22:05:51 +0000
78+++ data/qt/side_widget.ui 2012-03-15 20:47:20 +0000
79@@ -11,17 +11,11 @@
80 </rect>
81 </property>
82 <property name="sizePolicy">
83- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
84+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
85 <horstretch>0</horstretch>
86 <verstretch>0</verstretch>
87 </sizepolicy>
88 </property>
89- <property name="minimumSize">
90- <size>
91- <width>170</width>
92- <height>466</height>
93- </size>
94- </property>
95 <layout class="QVBoxLayout" name="verticalLayout">
96 <property name="spacing">
97 <number>40</number>
98@@ -80,6 +74,12 @@
99 <property name="enabled">
100 <bool>true</bool>
101 </property>
102+ <property name="sizePolicy">
103+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
104+ <horstretch>0</horstretch>
105+ <verstretch>0</verstretch>
106+ </sizepolicy>
107+ </property>
108 <property name="text">
109 <string notr="true">Install</string>
110 </property>
111@@ -116,6 +116,12 @@
112 <property name="enabled">
113 <bool>true</bool>
114 </property>
115+ <property name="sizePolicy">
116+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
117+ <horstretch>0</horstretch>
118+ <verstretch>0</verstretch>
119+ </sizepolicy>
120+ </property>
121 <property name="text">
122 <string notr="true">Sign In</string>
123 </property>
124@@ -149,6 +155,12 @@
125 <property name="enabled">
126 <bool>true</bool>
127 </property>
128+ <property name="sizePolicy">
129+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
130+ <horstretch>0</horstretch>
131+ <verstretch>0</verstretch>
132+ </sizepolicy>
133+ </property>
134 <property name="text">
135 <string notr="true">Select sync folders</string>
136 </property>
137@@ -182,6 +194,12 @@
138 <property name="enabled">
139 <bool>true</bool>
140 </property>
141+ <property name="sizePolicy">
142+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
143+ <horstretch>0</horstretch>
144+ <verstretch>0</verstretch>
145+ </sizepolicy>
146+ </property>
147 <property name="text">
148 <string notr="true">Sync, stream, share!</string>
149 </property>
150
151=== modified file 'data/qt/signin.ui'
152--- data/qt/signin.ui 2012-03-02 17:13:04 +0000
153+++ data/qt/signin.ui 2012-03-15 20:47:20 +0000
154@@ -72,13 +72,6 @@
155 </item>
156 <item>
157 <widget class="QLabel" name="welcome_label">
158- <property name="font">
159- <font>
160- <pointsize>11</pointsize>
161- <weight>50</weight>
162- <bold>false</bold>
163- </font>
164- </property>
165 <property name="text">
166 <string notr="true">Welcome to Ubuntu One</string>
167 </property>
168
169=== modified file 'data/qt/ubuntuone.qss'
170--- data/qt/ubuntuone.qss 2012-03-08 21:10:21 +0000
171+++ data/qt/ubuntuone.qss 2012-03-15 20:47:20 +0000
172@@ -12,7 +12,6 @@
173
174 QWidget {
175 font-family: "Ubuntu";
176- font-size: 13px;
177 color: #333333;
178 }
179
180@@ -63,10 +62,6 @@
181 min-height: 100px;
182 }
183
184-QFrame#frm_box > QLabel {
185- font-size: 24px;
186-}
187-
188 SideWidget {
189 background-color: white;
190 border-style: dotted;
191@@ -273,7 +268,7 @@
192 border: none;
193 margin-top: 1ex;
194 color: #333333;
195- font: bold 14px;
196+ font-weight: bold;
197 }
198
199 QGroupBox#profile,
200@@ -306,7 +301,7 @@
201 }
202
203 QLabel#other_devices_label {
204- font: bold 16px;
205+ font-weight: bold;
206 }
207
208 QLabel#percentage_usage_label {
209@@ -317,24 +312,11 @@
210 color: white;
211 }
212
213-QLabel#sign_in_label {
214- font: 16px;
215-}
216-
217-QLabel#email_label,
218-QLabel#password_label {
219- font-size: 10px;
220-}
221-
222 QLabel[OverQuota="true"],
223 QLabel#warning_label {
224 color: #df2d1f;
225 }
226
227-QLabel#welcome_label {
228- font-size: 20px;
229-}
230-
231 QAbstractItemView {
232 border-style: solid;
233 border-color: #898989;
234
235=== modified file 'ubuntuone/controlpanel/gui/qt/controlpanel.py'
236--- ubuntuone/controlpanel/gui/qt/controlpanel.py 2012-03-01 22:05:51 +0000
237+++ ubuntuone/controlpanel/gui/qt/controlpanel.py 2012-03-15 20:47:20 +0000
238@@ -48,8 +48,8 @@
239
240 logger = setup_logging('qt.controlpanel')
241
242-NAME_STYLE = '<br><span style=" font-size:16pt;">%s!</span>'
243-PERCENTAGE_STYLE = '<span style=" font-size:16pt;">%.0f%%</span>'
244+NAME_STYLE = u'<br><span style=" font-size:xx-large;">%s!</span>'
245+PERCENTAGE_STYLE = u'<span style=" font-size:x-large;">%.0f%%</span>'
246
247
248 class ControlPanel(UbuntuOneBin):
249
250=== modified file 'ubuntuone/controlpanel/gui/qt/loadingoverlay.py'
251--- ubuntuone/controlpanel/gui/qt/loadingoverlay.py 2012-03-08 20:46:13 +0000
252+++ ubuntuone/controlpanel/gui/qt/loadingoverlay.py 2012-03-15 20:47:20 +0000
253@@ -23,6 +23,8 @@
254 from ubuntuone.controlpanel.gui import LOADING_OVERLAY
255 from ubuntuone.controlpanel.gui.qt.ui import loadingoverlay_ui
256
257+LOADING_OVERLAY_MARKUP = u'<span style="font-size:xx-large;">{0}</span>'
258+
259
260 class LoadingOverlay(QtGui.QFrame):
261 """The widget that shows a loading animation and disable the widget below.
262@@ -45,7 +47,7 @@
263 self.counter = 0
264 self.orientation = False
265
266- self.ui.label.setText(LOADING_OVERLAY)
267+ self.ui.label.setText(LOADING_OVERLAY_MARKUP.format(LOADING_OVERLAY))
268
269 # Invalid name "paintEvent"
270 # pylint: disable=C0103
271
272=== modified file 'ubuntuone/controlpanel/gui/qt/signin.py'
273--- ubuntuone/controlpanel/gui/qt/signin.py 2012-03-02 17:13:04 +0000
274+++ ubuntuone/controlpanel/gui/qt/signin.py 2012-03-15 20:47:20 +0000
275@@ -24,6 +24,8 @@
276 from ubuntuone.controlpanel.gui.qt.ubuntuonebin import UbuntuOneBin
277 from ubuntuone.controlpanel.gui.qt.ui import signin_ui
278
279+WELCOME_MARKUP = u'<span style="font-size:xx-large;">{0}</span>'
280+
281
282 class SignInPanel(UbuntuOneBin):
283 """The widget for signing in."""
284@@ -33,6 +35,6 @@
285 def _setup(self):
286 """Do some extra setupping for the UI."""
287 super(SignInPanel, self)._setup()
288- self.ui.welcome_label.setText(WELCOME_LABEL)
289+ self.ui.welcome_label.setText(WELCOME_MARKUP.format(WELCOME_LABEL))
290 self.ui.login_button.setText(EXISTING_ACCOUNT_CHOICE_BUTTON)
291 self.ui.register_button.setText(SET_UP_ACCOUNT_CHOICE_BUTTON)
292
293=== modified file 'ubuntuone/controlpanel/gui/qt/tests/test_signin.py'
294--- ubuntuone/controlpanel/gui/qt/tests/test_signin.py 2012-03-12 16:53:02 +0000
295+++ ubuntuone/controlpanel/gui/qt/tests/test_signin.py 2012-03-15 20:47:20 +0000
296@@ -48,7 +48,7 @@
297 def test_label_is_correct(self):
298 """The welcome_label has the correct text."""
299 self.assertEqual(unicode(self.ui.ui.welcome_label.text()),
300- gui.WELCOME_LABEL)
301+ gui.WELCOME_MARKUP.format(gui.WELCOME_LABEL))
302
303 def test_buttos_are_correct(self):
304 """The buttos have the correct text."""

Subscribers

People subscribed via source and target branches

to all changes: