Merge lp:~nataliabidart/ubuntuone-control-panel/u1cp-windows-styling into lp:ubuntuone-control-panel

Proposed by Natalia Bidart on 2012-03-27
Status: Merged
Approved by: Natalia Bidart on 2012-03-27
Approved revision: 301
Merged at revision: 300
Proposed branch: lp:~nataliabidart/ubuntuone-control-panel/u1cp-windows-styling
Merge into: lp:ubuntuone-control-panel
Diff against target: 115 lines (+29/-18)
5 files modified
data/qt/linux.qss (+16/-0)
data/qt/ubuntuone.qss (+0/-16)
data/qt/windows.qss (+11/-0)
ubuntuone/controlpanel/gui/qt/main/__init__.py (+1/-1)
ubuntuone/controlpanel/gui/qt/main/tests/test_main.py (+1/-1)
To merge this branch: bzr merge lp:~nataliabidart/ubuntuone-control-panel/u1cp-windows-styling
Reviewer Review Type Date Requested Status
Brian Curtin (community) Approve on 2012-03-27
Roberto Alsina (community) 2012-03-27 Approve on 2012-03-27
Review via email: mp+99525@code.launchpad.net

Commit Message

- Isolate linux specific styling hacks to avoid weird side effects on windows
  (LP: #961229).

To post a comment you must log in.
299. By Natalia Bidart on 2012-03-27

- Isolate linux specific styling hacks to avoid weird side effects on windows
  (LP: #961229).

300. By Natalia Bidart on 2012-03-27

- Also fix tests :-).

Roberto Alsina (ralsina) wrote :

+1

review: Approve
301. By Natalia Bidart on 2012-03-27

Merged trunk in.

Brian Curtin (brian.curtin) wrote :

+1, IRL test on Windows looks fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/qt/linux.qss'
2--- data/qt/linux.qss 2012-03-16 21:10:54 +0000
3+++ data/qt/linux.qss 2012-03-27 14:35:22 +0000
4@@ -1,2 +1,18 @@
5 /* Styles specific to the linux platform */
6
7+QPushButton:focus,
8+GoToWebButton#help_button:focus,
9+GoToWebButton#share_publish_button:focus {
10+ /* hack to make the mild-orange focused box dissapear */
11+ padding-top: 100%;
12+ padding-bottom: 100%;
13+ /* end of hack */
14+}
15+
16+QTabBar::tab:hover,
17+QTabBar::tab:focus {
18+ /* hack to make the mild-orange focused box dissapear */
19+ padding-left: 1000px;
20+ padding-right: 1000px;
21+ /* end of hack */
22+}
23
24=== modified file 'data/qt/ubuntuone.qss'
25--- data/qt/ubuntuone.qss 2012-03-26 20:15:14 +0000
26+++ data/qt/ubuntuone.qss 2012-03-27 14:35:22 +0000
27@@ -81,10 +81,6 @@
28 padding: 5px;
29 padding-left: 19px;
30 padding-right: 19px;
31- /* hack to make the mild-orange focused box dissapear */
32- padding-top: 100%;
33- padding-bottom: 100%;
34- /* end of hack */
35 }
36
37 QPushButton:disabled {
38@@ -175,10 +171,6 @@
39
40 GoToWebButton#help_button:focus {
41 border: 2px solid #dd4814;
42- /* hack to make the mild-orange focused box dissapear */
43- padding-top: 100%;
44- padding-bottom: 100%;
45- /* end of hack */
46 /* Compensate for border so text doesn't move */
47 padding-left: 0px;
48 padding-right: 13px;
49@@ -199,10 +191,6 @@
50
51 GoToWebButton#share_publish_button:focus {
52 border: 2px solid #aea79f;
53- /* hack to make the mild-orange focused box dissapear */
54- padding-top: 100%;
55- padding-bottom: 100%;
56- /* end of hack */
57 /* Compensate for border so text doesn't move */
58 padding-left: 8px;
59 padding-right: 23px;
60@@ -269,10 +257,6 @@
61 QTabBar::tab:hover,
62 QTabBar::tab:focus {
63 text-decoration: underline;
64- /* hack to make the mild-orange focused box dissapear */
65- padding-left: 1000px;
66- padding-right: 1000px;
67- /* end of hack */
68 }
69
70 QGroupBox {
71
72=== modified file 'data/qt/windows.qss'
73--- data/qt/windows.qss 2012-03-15 01:25:08 +0000
74+++ data/qt/windows.qss 2012-03-27 14:35:22 +0000
75@@ -3,3 +3,14 @@
76 QWidget {
77 font-family: "Ubuntu";
78 }
79+
80+QTabBar::tab:hover,
81+QTabBar::tab:focus {
82+ padding-left: 0px;
83+ padding-right: 0px;
84+}
85+
86+QPushButton#twitter_button:focus,
87+QPushButton#facebook_button:focus {
88+ padding: 0px;
89+}
90
91=== modified file 'ubuntuone/controlpanel/gui/qt/main/__init__.py'
92--- ubuntuone/controlpanel/gui/qt/main/__init__.py 2012-03-20 18:06:07 +0000
93+++ ubuntuone/controlpanel/gui/qt/main/__init__.py 2012-03-27 14:35:22 +0000
94@@ -89,7 +89,7 @@
95 source.main(app)
96
97 data = []
98- for qss_name in (source.PLATFORM_QSS, ":/ubuntuone.qss"):
99+ for qss_name in (":/ubuntuone.qss", source.PLATFORM_QSS):
100 qss = QtCore.QResource(qss_name)
101 data.append(unicode(qss.data()))
102 app.setStyleSheet('\n'.join(data))
103
104=== modified file 'ubuntuone/controlpanel/gui/qt/main/tests/test_main.py'
105--- ubuntuone/controlpanel/gui/qt/main/tests/test_main.py 2012-03-20 18:06:07 +0000
106+++ ubuntuone/controlpanel/gui/qt/main/tests/test_main.py 2012-03-27 14:35:22 +0000
107@@ -150,7 +150,7 @@
108 """Ensure the platform style is loaded."""
109 main.main([sys.argv[0]])
110 data = []
111- for qss_name in (main.source.PLATFORM_QSS, ":/ubuntuone.qss"):
112+ for qss_name in (":/ubuntuone.qss", main.source.PLATFORM_QSS):
113 qss = QtCore.QResource(qss_name)
114 data.append(unicode(qss.data()))
115 self.assertEqual((('\n'.join(data),), {}), self.app.style)

Subscribers

People subscribed via source and target branches