Merge lp:~xnox/ubiquity/no-bubbles into lp:ubiquity

Proposed by Dimitri John Ledkov
Status: Merged
Approved by: Colin Watson
Approved revision: 6031
Merged at revision: 6031
Proposed branch: lp:~xnox/ubiquity/no-bubbles
Merge into: lp:ubiquity
Diff against target: 99 lines (+18/-29)
3 files modified
debian/changelog (+7/-0)
ubiquity/frontend/gtk_ui.py (+5/-0)
ubiquity/gtkwidgets.py (+6/-29)
To merge this branch: bzr merge lp:~xnox/ubiquity/no-bubbles
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+191348@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2013-10-14 17:19:29 +0000
+++ debian/changelog 2013-10-16 08:35:09 +0000
@@ -1,3 +1,10 @@
1ubiquity (2.15.25) UNRELEASED; urgency=low
2
3 * Remove all cairo styling from partition boxes in automatic
4 partitioning, instead use gtk3/css styling. (LP: #947107)
5
6 -- Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> Tue, 15 Oct 2013 00:29:41 +0100
7
1ubiquity (2.15.24) saucy; urgency=low8ubiquity (2.15.24) saucy; urgency=low
29
3 [ Colin Watson ]10 [ Colin Watson ]
411
=== modified file 'ubiquity/frontend/gtk_ui.py'
--- ubiquity/frontend/gtk_ui.py 2013-07-11 18:23:07 +0000
+++ ubiquity/frontend/gtk_ui.py 2013-10-16 08:35:09 +0000
@@ -268,6 +268,11 @@
268 -GtkProgressBar-min-horizontal-bar-height : 10;268 -GtkProgressBar-min-horizontal-bar-height : 10;
269 -GtkProgressBar-min-horizontal-bar-width : 10;269 -GtkProgressBar-min-horizontal-bar-width : 10;
270 }270 }
271 GtkEventBox.fancy {
272 background-color: alpha (@selected_bg_color, 0.5);
273 border-width: 1px;
274 border-radius: 10px;
275 }
271 ''')276 ''')
272 Gtk.StyleContext.add_provider_for_screen(277 Gtk.StyleContext.add_provider_for_screen(
273 Gdk.Screen.get_default(),278 Gdk.Screen.get_default(),
274279
=== modified file 'ubiquity/gtkwidgets.py'
--- ubiquity/gtkwidgets.py 2013-04-15 08:09:11 +0000
+++ ubiquity/gtkwidgets.py 2013-10-16 08:35:09 +0000
@@ -128,10 +128,14 @@
128 # for the linear gradient?128 # for the linear gradient?
129 self.existing_part = existing_part or PartitionBox()129 self.existing_part = existing_part or PartitionBox()
130 eb = Gtk.EventBox()130 eb = Gtk.EventBox()
131 style = eb.get_style_context()
132 style.add_class('fancy')
131 eb.add(self.existing_part)133 eb.add(self.existing_part)
132 self.pack1(eb, resize=False, shrink=False)134 self.pack1(eb, resize=False, shrink=False)
133 self.new_part = new_part or PartitionBox()135 self.new_part = new_part or PartitionBox()
134 eb = Gtk.EventBox()136 eb = Gtk.EventBox()
137 style = eb.get_style_context()
138 style.add_class('fancy')
135 eb.add(self.new_part)139 eb.add(self.new_part)
136 self.pack2(eb, resize=False, shrink=False)140 self.pack2(eb, resize=False, shrink=False)
137 self.show_all()141 self.show_all()
@@ -201,7 +205,7 @@
201GObject.type_register(DiskBox)205GObject.type_register(DiskBox)
202206
203207
204class PartitionBox(StylizedFrame):208class PartitionBox(Gtk.Alignment):
205 __gtype_name__ = 'PartitionBox'209 __gtype_name__ = 'PartitionBox'
206 __gproperties__ = {210 __gproperties__ = {
207 'title': (211 'title': (
@@ -243,7 +247,7 @@
243 # 4 px between the title and the extra heading247 # 4 px between the title and the extra heading
244 # 5 px between the extra heading and the size248 # 5 px between the extra heading and the size
245 # 12 px below the bottom-most element249 # 12 px below the bottom-most element
246 StylizedFrame.__init__(self)250 Gtk.Alignment.__init__(self)
247 vbox = Gtk.Box()251 vbox = Gtk.Box()
248 vbox.set_orientation(Gtk.Orientation.VERTICAL)252 vbox.set_orientation(Gtk.Orientation.VERTICAL)
249 self.logo = Gtk.Image.new_from_icon_name(icon_name,253 self.logo = Gtk.Image.new_from_icon_name(icon_name,
@@ -284,33 +288,6 @@
284 size = misc.format_size(size)288 size = misc.format_size(size)
285 self.size.set_markup('<span size="x-large">%s</span>' % size)289 self.size.set_markup('<span size="x-large">%s</span>' % size)
286290
287 def render_dots(self):
288 # FIXME: Dots are rendered over the frame.
289 s = cairo.ImageSurface(cairo.FORMAT_ARGB32, 2, 2)
290 cr = cairo.Context(s)
291 cr.set_source_rgb(*gtk_to_cairo_color('#b6b0a9'))
292 cr.rectangle(1, 1, 1, 1)
293 cr.fill()
294 pattern = cairo.SurfacePattern(s)
295 return pattern
296
297 def paint_background(self, c):
298 StylizedFrame.paint_background(self, c)
299 a = self.get_allocation()
300 pattern = self.render_dots()
301 pattern.set_extend(cairo.EXTEND_REPEAT)
302 c.set_source(pattern)
303 c.fill_preserve()
304
305 g = cairo.RadialGradient(a.width / 2, a.height / 2, 0, a.width / 2,
306 a.height / 2,
307 a.width > a.height and a.width or a.height)
308 g.add_color_stop_rgba(0.00, 1, 1, 1, 1.00)
309 g.add_color_stop_rgba(0.25, 1, 1, 1, 0.75)
310 g.add_color_stop_rgba(0.40, 1, 1, 1, 0.00)
311 c.set_source(g)
312 c.fill_preserve()
313
314GObject.type_register(PartitionBox)291GObject.type_register(PartitionBox)
315292
316293

Subscribers

People subscribed via source and target branches

to status/vote changes: