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
=== modified file 'data/qt/controlpanel.ui'
--- data/qt/controlpanel.ui 2012-03-08 20:46:13 +0000
+++ data/qt/controlpanel.ui 2012-03-15 20:47:20 +0000
@@ -139,11 +139,6 @@
139 </item>139 </item>
140 <item>140 <item>
141 <widget class="QLabel" name="quota_usage_label">141 <widget class="QLabel" name="quota_usage_label">
142 <property name="font">
143 <font>
144 <pointsize>8</pointsize>
145 </font>
146 </property>
147 <property name="text">142 <property name="text">
148 <string/>143 <string/>
149 </property>144 </property>
@@ -309,11 +304,6 @@
309 </item>304 </item>
310 <item>305 <item>
311 <widget class="QLabel" name="follow_us_label">306 <widget class="QLabel" name="follow_us_label">
312 <property name="font">
313 <font>
314 <pointsize>11</pointsize>
315 </font>
316 </property>
317 <property name="text">307 <property name="text">
318 <string notr="true">Talk to us</string>308 <string notr="true">Talk to us</string>
319 </property>309 </property>
320310
=== modified file 'data/qt/loadingoverlay.ui'
--- data/qt/loadingoverlay.ui 2012-02-22 15:35:13 +0000
+++ data/qt/loadingoverlay.ui 2012-03-15 20:47:20 +0000
@@ -52,11 +52,6 @@
52 <verstretch>0</verstretch>52 <verstretch>0</verstretch>
53 </sizepolicy>53 </sizepolicy>
54 </property>54 </property>
55 <property name="font">
56 <font>
57 <pointsize>14</pointsize>
58 </font>
59 </property>
60 <property name="text">55 <property name="text">
61 <string notr="true">Getting information, please wait...</string>56 <string notr="true">Getting information, please wait...</string>
62 </property>57 </property>
6358
=== modified file 'data/qt/preferences.ui'
--- data/qt/preferences.ui 2012-03-08 20:46:13 +0000
+++ data/qt/preferences.ui 2012-03-15 20:47:20 +0000
@@ -7,7 +7,7 @@
7 <x>0</x>7 <x>0</x>
8 <y>0</y>8 <y>0</y>
9 <width>520</width>9 <width>520</width>
10 <height>342</height>10 <height>311</height>
11 </rect>11 </rect>
12 </property>12 </property>
13 <property name="windowTitle">13 <property name="windowTitle">
@@ -98,7 +98,7 @@
98 <property name="sizeHint" stdset="0">98 <property name="sizeHint" stdset="0">
99 <size>99 <size>
100 <width>40</width>100 <width>40</width>
101 <height>20</height>101 <height>10</height>
102 </size>102 </size>
103 </property>103 </property>
104 </spacer>104 </spacer>
@@ -180,7 +180,7 @@
180 <property name="sizeHint" stdset="0">180 <property name="sizeHint" stdset="0">
181 <size>181 <size>
182 <width>20</width>182 <width>20</width>
183 <height>40</height>183 <height>10</height>
184 </size>184 </size>
185 </property>185 </property>
186 </spacer>186 </spacer>
187187
=== modified file 'data/qt/side_widget.ui'
--- data/qt/side_widget.ui 2012-03-01 22:05:51 +0000
+++ data/qt/side_widget.ui 2012-03-15 20:47:20 +0000
@@ -11,17 +11,11 @@
11 </rect>11 </rect>
12 </property>12 </property>
13 <property name="sizePolicy">13 <property name="sizePolicy">
14 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">14 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
15 <horstretch>0</horstretch>15 <horstretch>0</horstretch>
16 <verstretch>0</verstretch>16 <verstretch>0</verstretch>
17 </sizepolicy>17 </sizepolicy>
18 </property>18 </property>
19 <property name="minimumSize">
20 <size>
21 <width>170</width>
22 <height>466</height>
23 </size>
24 </property>
25 <layout class="QVBoxLayout" name="verticalLayout">19 <layout class="QVBoxLayout" name="verticalLayout">
26 <property name="spacing">20 <property name="spacing">
27 <number>40</number>21 <number>40</number>
@@ -80,6 +74,12 @@
80 <property name="enabled">74 <property name="enabled">
81 <bool>true</bool>75 <bool>true</bool>
82 </property>76 </property>
77 <property name="sizePolicy">
78 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
79 <horstretch>0</horstretch>
80 <verstretch>0</verstretch>
81 </sizepolicy>
82 </property>
83 <property name="text">83 <property name="text">
84 <string notr="true">Install</string>84 <string notr="true">Install</string>
85 </property>85 </property>
@@ -116,6 +116,12 @@
116 <property name="enabled">116 <property name="enabled">
117 <bool>true</bool>117 <bool>true</bool>
118 </property>118 </property>
119 <property name="sizePolicy">
120 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
121 <horstretch>0</horstretch>
122 <verstretch>0</verstretch>
123 </sizepolicy>
124 </property>
119 <property name="text">125 <property name="text">
120 <string notr="true">Sign In</string>126 <string notr="true">Sign In</string>
121 </property>127 </property>
@@ -149,6 +155,12 @@
149 <property name="enabled">155 <property name="enabled">
150 <bool>true</bool>156 <bool>true</bool>
151 </property>157 </property>
158 <property name="sizePolicy">
159 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
160 <horstretch>0</horstretch>
161 <verstretch>0</verstretch>
162 </sizepolicy>
163 </property>
152 <property name="text">164 <property name="text">
153 <string notr="true">Select sync folders</string>165 <string notr="true">Select sync folders</string>
154 </property>166 </property>
@@ -182,6 +194,12 @@
182 <property name="enabled">194 <property name="enabled">
183 <bool>true</bool>195 <bool>true</bool>
184 </property>196 </property>
197 <property name="sizePolicy">
198 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
199 <horstretch>0</horstretch>
200 <verstretch>0</verstretch>
201 </sizepolicy>
202 </property>
185 <property name="text">203 <property name="text">
186 <string notr="true">Sync, stream, share!</string>204 <string notr="true">Sync, stream, share!</string>
187 </property>205 </property>
188206
=== modified file 'data/qt/signin.ui'
--- data/qt/signin.ui 2012-03-02 17:13:04 +0000
+++ data/qt/signin.ui 2012-03-15 20:47:20 +0000
@@ -72,13 +72,6 @@
72 </item>72 </item>
73 <item>73 <item>
74 <widget class="QLabel" name="welcome_label">74 <widget class="QLabel" name="welcome_label">
75 <property name="font">
76 <font>
77 <pointsize>11</pointsize>
78 <weight>50</weight>
79 <bold>false</bold>
80 </font>
81 </property>
82 <property name="text">75 <property name="text">
83 <string notr="true">Welcome to Ubuntu One</string>76 <string notr="true">Welcome to Ubuntu One</string>
84 </property>77 </property>
8578
=== modified file 'data/qt/ubuntuone.qss'
--- data/qt/ubuntuone.qss 2012-03-08 21:10:21 +0000
+++ data/qt/ubuntuone.qss 2012-03-15 20:47:20 +0000
@@ -12,7 +12,6 @@
1212
13QWidget {13QWidget {
14 font-family: "Ubuntu";14 font-family: "Ubuntu";
15 font-size: 13px;
16 color: #333333;15 color: #333333;
17}16}
1817
@@ -63,10 +62,6 @@
63 min-height: 100px;62 min-height: 100px;
64}63}
6564
66QFrame#frm_box > QLabel {
67 font-size: 24px;
68}
69
70SideWidget {65SideWidget {
71 background-color: white;66 background-color: white;
72 border-style: dotted;67 border-style: dotted;
@@ -273,7 +268,7 @@
273 border: none;268 border: none;
274 margin-top: 1ex;269 margin-top: 1ex;
275 color: #333333;270 color: #333333;
276 font: bold 14px;271 font-weight: bold;
277}272}
278273
279QGroupBox#profile,274QGroupBox#profile,
@@ -306,7 +301,7 @@
306}301}
307302
308QLabel#other_devices_label {303QLabel#other_devices_label {
309 font: bold 16px;304 font-weight: bold;
310}305}
311306
312QLabel#percentage_usage_label {307QLabel#percentage_usage_label {
@@ -317,24 +312,11 @@
317 color: white;312 color: white;
318}313}
319314
320QLabel#sign_in_label {
321 font: 16px;
322}
323
324QLabel#email_label,
325QLabel#password_label {
326 font-size: 10px;
327}
328
329QLabel[OverQuota="true"],315QLabel[OverQuota="true"],
330QLabel#warning_label {316QLabel#warning_label {
331 color: #df2d1f;317 color: #df2d1f;
332}318}
333319
334QLabel#welcome_label {
335 font-size: 20px;
336}
337
338QAbstractItemView {320QAbstractItemView {
339 border-style: solid;321 border-style: solid;
340 border-color: #898989;322 border-color: #898989;
341323
=== modified file 'ubuntuone/controlpanel/gui/qt/controlpanel.py'
--- ubuntuone/controlpanel/gui/qt/controlpanel.py 2012-03-01 22:05:51 +0000
+++ ubuntuone/controlpanel/gui/qt/controlpanel.py 2012-03-15 20:47:20 +0000
@@ -48,8 +48,8 @@
4848
49logger = setup_logging('qt.controlpanel')49logger = setup_logging('qt.controlpanel')
5050
51NAME_STYLE = '<br><span style=" font-size:16pt;">%s!</span>'51NAME_STYLE = u'<br><span style=" font-size:xx-large;">%s!</span>'
52PERCENTAGE_STYLE = '<span style=" font-size:16pt;">%.0f%%</span>'52PERCENTAGE_STYLE = u'<span style=" font-size:x-large;">%.0f%%</span>'
5353
5454
55class ControlPanel(UbuntuOneBin):55class ControlPanel(UbuntuOneBin):
5656
=== modified file 'ubuntuone/controlpanel/gui/qt/loadingoverlay.py'
--- ubuntuone/controlpanel/gui/qt/loadingoverlay.py 2012-03-08 20:46:13 +0000
+++ ubuntuone/controlpanel/gui/qt/loadingoverlay.py 2012-03-15 20:47:20 +0000
@@ -23,6 +23,8 @@
23from ubuntuone.controlpanel.gui import LOADING_OVERLAY23from ubuntuone.controlpanel.gui import LOADING_OVERLAY
24from ubuntuone.controlpanel.gui.qt.ui import loadingoverlay_ui24from ubuntuone.controlpanel.gui.qt.ui import loadingoverlay_ui
2525
26LOADING_OVERLAY_MARKUP = u'<span style="font-size:xx-large;">{0}</span>'
27
2628
27class LoadingOverlay(QtGui.QFrame):29class LoadingOverlay(QtGui.QFrame):
28 """The widget that shows a loading animation and disable the widget below.30 """The widget that shows a loading animation and disable the widget below.
@@ -45,7 +47,7 @@
45 self.counter = 047 self.counter = 0
46 self.orientation = False48 self.orientation = False
4749
48 self.ui.label.setText(LOADING_OVERLAY)50 self.ui.label.setText(LOADING_OVERLAY_MARKUP.format(LOADING_OVERLAY))
4951
50 # Invalid name "paintEvent"52 # Invalid name "paintEvent"
51 # pylint: disable=C010353 # pylint: disable=C0103
5254
=== modified file 'ubuntuone/controlpanel/gui/qt/signin.py'
--- ubuntuone/controlpanel/gui/qt/signin.py 2012-03-02 17:13:04 +0000
+++ ubuntuone/controlpanel/gui/qt/signin.py 2012-03-15 20:47:20 +0000
@@ -24,6 +24,8 @@
24from ubuntuone.controlpanel.gui.qt.ubuntuonebin import UbuntuOneBin24from ubuntuone.controlpanel.gui.qt.ubuntuonebin import UbuntuOneBin
25from ubuntuone.controlpanel.gui.qt.ui import signin_ui25from ubuntuone.controlpanel.gui.qt.ui import signin_ui
2626
27WELCOME_MARKUP = u'<span style="font-size:xx-large;">{0}</span>'
28
2729
28class SignInPanel(UbuntuOneBin):30class SignInPanel(UbuntuOneBin):
29 """The widget for signing in."""31 """The widget for signing in."""
@@ -33,6 +35,6 @@
33 def _setup(self):35 def _setup(self):
34 """Do some extra setupping for the UI."""36 """Do some extra setupping for the UI."""
35 super(SignInPanel, self)._setup()37 super(SignInPanel, self)._setup()
36 self.ui.welcome_label.setText(WELCOME_LABEL)38 self.ui.welcome_label.setText(WELCOME_MARKUP.format(WELCOME_LABEL))
37 self.ui.login_button.setText(EXISTING_ACCOUNT_CHOICE_BUTTON)39 self.ui.login_button.setText(EXISTING_ACCOUNT_CHOICE_BUTTON)
38 self.ui.register_button.setText(SET_UP_ACCOUNT_CHOICE_BUTTON)40 self.ui.register_button.setText(SET_UP_ACCOUNT_CHOICE_BUTTON)
3941
=== modified file 'ubuntuone/controlpanel/gui/qt/tests/test_signin.py'
--- ubuntuone/controlpanel/gui/qt/tests/test_signin.py 2012-03-12 16:53:02 +0000
+++ ubuntuone/controlpanel/gui/qt/tests/test_signin.py 2012-03-15 20:47:20 +0000
@@ -48,7 +48,7 @@
48 def test_label_is_correct(self):48 def test_label_is_correct(self):
49 """The welcome_label has the correct text."""49 """The welcome_label has the correct text."""
50 self.assertEqual(unicode(self.ui.ui.welcome_label.text()),50 self.assertEqual(unicode(self.ui.ui.welcome_label.text()),
51 gui.WELCOME_LABEL)51 gui.WELCOME_MARKUP.format(gui.WELCOME_LABEL))
5252
53 def test_buttos_are_correct(self):53 def test_buttos_are_correct(self):
54 """The buttos have the correct text."""54 """The buttos have the correct text."""

Subscribers

People subscribed via source and target branches

to all changes: