Merge lp:~agateau/ubiquity/rework-prepare-step into lp:ubiquity

Proposed by Aurélien Gâteau
Status: Merged
Merged at revision: 5842
Proposed branch: lp:~agateau/ubiquity/rework-prepare-step
Merge into: lp:ubiquity
Prerequisite: lp:~agateau/ubiquity/layout-refresh
Diff against target: 219 lines (+90/-45)
3 files modified
gui/qt/stepPrepare.ui (+70/-21)
ubiquity/plugins/ubi-prepare.py (+1/-3)
ubiquity/qtwidgets.py (+19/-21)
To merge this branch: bzr merge lp:~agateau/ubiquity/rework-prepare-step
Reviewer Review Type Date Requested Status
Jonathan Riddell Pending
Review via email: mp+150906@code.launchpad.net

Description of the change

This branch improves the "Prepare" step of Ubiquity KDE frontend.

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 'gui/qt/stepPrepare.ui'
2--- gui/qt/stepPrepare.ui 2011-08-09 08:20:30 +0000
3+++ gui/qt/stepPrepare.ui 2013-02-27 21:04:24 +0000
4@@ -13,48 +13,104 @@
5 <property name="windowTitle">
6 <string>Form</string>
7 </property>
8- <layout class="QGridLayout" name="gridLayout">
9- <item row="1" column="0">
10+ <layout class="QVBoxLayout" name="verticalLayout">
11+ <item>
12+ <widget class="QLabel" name="prepare_heading_label">
13+ <property name="text">
14+ <string>Preparing to install ${RELEASE}</string>
15+ </property>
16+ </widget>
17+ </item>
18+ <item>
19+ <widget class="Line" name="line">
20+ <property name="orientation">
21+ <enum>Qt::Horizontal</enum>
22+ </property>
23+ </widget>
24+ </item>
25+ <item>
26+ <spacer name="verticalSpacer_3">
27+ <property name="orientation">
28+ <enum>Qt::Vertical</enum>
29+ </property>
30+ <property name="sizeType">
31+ <enum>QSizePolicy::Fixed</enum>
32+ </property>
33+ <property name="sizeHint" stdset="0">
34+ <size>
35+ <width>20</width>
36+ <height>24</height>
37+ </size>
38+ </property>
39+ </spacer>
40+ </item>
41+ <item>
42 <widget class="QLabel" name="prepare_best_results">
43 <property name="text">
44- <string>&lt;b&gt;For best results, please ensure:&lt;/b&gt;</string>
45- </property>
46- <property name="textFormat">
47- <enum>Qt::RichText</enum>
48+ <string>For best results, please ensure:</string>
49 </property>
50 </widget>
51 </item>
52- <item row="2" column="0">
53+ <item>
54 <layout class="QVBoxLayout" name="vbox1"/>
55 </item>
56- <item row="3" column="0">
57+ <item>
58+ <spacer name="verticalSpacer_2">
59+ <property name="orientation">
60+ <enum>Qt::Vertical</enum>
61+ </property>
62+ <property name="sizeType">
63+ <enum>QSizePolicy::Fixed</enum>
64+ </property>
65+ <property name="sizeHint" stdset="0">
66+ <size>
67+ <width>20</width>
68+ <height>24</height>
69+ </size>
70+ </property>
71+ </spacer>
72+ </item>
73+ <item>
74 <widget class="QLabel" name="prepare_foss_disclaimer">
75 <property name="text">
76 <string>&lt;qt&gt;${RELEASE} aims to be free and open-source software.&lt;br /&gt;However, this is not always possible.&lt;/span&gt;&lt;/qt&gt;</string>
77 </property>
78- <property name="textFormat">
79- <enum>Qt::RichText</enum>
80- </property>
81 <property name="wordWrap">
82 <bool>true</bool>
83 </property>
84 </widget>
85 </item>
86- <item row="4" column="0">
87+ <item>
88 <widget class="QCheckBox" name="prepare_nonfree_software">
89 <property name="text">
90 <string>Please offer me non-open-source software if it is needed for a better experience</string>
91 </property>
92 </widget>
93 </item>
94- <item row="5" column="0">
95+ <item>
96+ <spacer name="verticalSpacer_4">
97+ <property name="orientation">
98+ <enum>Qt::Vertical</enum>
99+ </property>
100+ <property name="sizeType">
101+ <enum>QSizePolicy::Fixed</enum>
102+ </property>
103+ <property name="sizeHint" stdset="0">
104+ <size>
105+ <width>20</width>
106+ <height>24</height>
107+ </size>
108+ </property>
109+ </spacer>
110+ </item>
111+ <item>
112 <widget class="QCheckBox" name="prepare_download_updates">
113 <property name="text">
114 <string>Download updates while installing</string>
115 </property>
116 </widget>
117 </item>
118- <item row="6" column="0">
119+ <item>
120 <spacer name="verticalSpacer">
121 <property name="orientation">
122 <enum>Qt::Vertical</enum>
123@@ -67,13 +123,6 @@
124 </property>
125 </spacer>
126 </item>
127- <item row="0" column="0">
128- <widget class="QLabel" name="prepare_heading_label">
129- <property name="text">
130- <string>Preparing to install ${RELEASE}</string>
131- </property>
132- </widget>
133- </item>
134 </layout>
135 </widget>
136 <resources/>
137
138=== modified file 'ubiquity/plugins/ubi-prepare.py'
139--- ubiquity/plugins/ubi-prepare.py 2013-02-19 11:33:07 +0000
140+++ ubiquity/plugins/ubi-prepare.py 2013-02-27 21:04:24 +0000
141@@ -204,8 +204,7 @@
142 def plugin_translate(self, lang):
143 PreparePageBase.plugin_translate(self, lang)
144 # gtk does the ${RELEASE} replace for the title in gtk_ui but we do
145- # it per plugin because our title widget is per plugin. Also add
146- # Bold here (not sure how the gtk side keeps that formatting).
147+ # it per plugin because our title widget is per plugin
148 release = misc.get_release()
149 widgets = (
150 self.page.prepare_heading_label,
151@@ -216,7 +215,6 @@
152 text = widget.text()
153 text = text.replace('${RELEASE}', release.name)
154 text = text.replace('Ubuntu', 'Kubuntu')
155- text = "<b>" + text + "</b>"
156 widget.setText(text)
157
158
159
160=== modified file 'ubiquity/qtwidgets.py'
161--- ubiquity/qtwidgets.py 2013-02-19 11:33:07 +0000
162+++ ubiquity/qtwidgets.py 2013-02-27 21:04:24 +0000
163@@ -2,37 +2,35 @@
164
165 import sys
166
167-from PyQt4.QtCore import Qt
168-from PyQt4.QtGui import QFrame, QHBoxLayout, QLabel, QPalette, QPixmap
169-
170-
171-class StateBox(QFrame):
172+from PyQt4.QtGui import QWidget, QHBoxLayout, QLabel, QPixmap
173+
174+
175+class StateBox(QWidget):
176 def __init__(self, parent, text=''):
177- QFrame.__init__(self, parent)
178- self.setFrameStyle(QFrame.StyledPanel | QFrame.Sunken)
179- self.setAutoFillBackground(True)
180- palette = self.palette()
181- palette.setColor(QPalette.Window, Qt.white)
182- self.setPalette(palette)
183+ QWidget.__init__(self, parent)
184+
185+ self.label = QLabel(text, self)
186+ self.image = QLabel(self)
187+
188 layout = QHBoxLayout(self)
189- self.setLayout(layout)
190- self.image = QLabel(self)
191- self.image.setPixmap(QPixmap(
192- "/usr/share/icons/oxygen/32x32/actions/dialog-ok.png"))
193+ layout.setContentsMargins(12, 0, 0, 0)
194+ layout.setSpacing(0)
195 layout.addWidget(self.image)
196- self.label = QLabel(text, self)
197 layout.addWidget(self.label)
198 layout.addStretch()
199- self.status = True
200+
201+ self.set_state(True)
202
203 def set_state(self, state):
204 self.status = state
205 if state:
206- self.image.setPixmap(QPixmap(
207- "/usr/share/icons/oxygen/32x32/actions/dialog-ok.png"))
208+ # A tickmark
209+ name = "dialog-ok-apply.png"
210 else:
211- self.image.setPixmap(QPixmap(
212- "/usr/share/icons/oxygen/32x32/actions/dialog-cancel.png"))
213+ # A cross
214+ name = "edit-delete.png"
215+ name = "/usr/share/icons/oxygen/22x22/actions/" + name
216+ self.image.setPixmap(QPixmap(name))
217
218 def get_state(self):
219 return self.status

Subscribers

People subscribed via source and target branches

to status/vote changes: