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

Proposed by Dimitri John Ledkov on 2013-10-16
Status: Merged
Approved by: Colin Watson on 2013-10-16
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 2013-10-16 Approve on 2013-10-16
Review via email: mp+191348@code.launchpad.net
To post a comment you must log in.
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-10-14 17:19:29 +0000
3+++ debian/changelog 2013-10-16 08:35:09 +0000
4@@ -1,3 +1,10 @@
5+ubiquity (2.15.25) UNRELEASED; urgency=low
6+
7+ * Remove all cairo styling from partition boxes in automatic
8+ partitioning, instead use gtk3/css styling. (LP: #947107)
9+
10+ -- Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> Tue, 15 Oct 2013 00:29:41 +0100
11+
12 ubiquity (2.15.24) saucy; urgency=low
13
14 [ Colin Watson ]
15
16=== modified file 'ubiquity/frontend/gtk_ui.py'
17--- ubiquity/frontend/gtk_ui.py 2013-07-11 18:23:07 +0000
18+++ ubiquity/frontend/gtk_ui.py 2013-10-16 08:35:09 +0000
19@@ -268,6 +268,11 @@
20 -GtkProgressBar-min-horizontal-bar-height : 10;
21 -GtkProgressBar-min-horizontal-bar-width : 10;
22 }
23+ GtkEventBox.fancy {
24+ background-color: alpha (@selected_bg_color, 0.5);
25+ border-width: 1px;
26+ border-radius: 10px;
27+ }
28 ''')
29 Gtk.StyleContext.add_provider_for_screen(
30 Gdk.Screen.get_default(),
31
32=== modified file 'ubiquity/gtkwidgets.py'
33--- ubiquity/gtkwidgets.py 2013-04-15 08:09:11 +0000
34+++ ubiquity/gtkwidgets.py 2013-10-16 08:35:09 +0000
35@@ -128,10 +128,14 @@
36 # for the linear gradient?
37 self.existing_part = existing_part or PartitionBox()
38 eb = Gtk.EventBox()
39+ style = eb.get_style_context()
40+ style.add_class('fancy')
41 eb.add(self.existing_part)
42 self.pack1(eb, resize=False, shrink=False)
43 self.new_part = new_part or PartitionBox()
44 eb = Gtk.EventBox()
45+ style = eb.get_style_context()
46+ style.add_class('fancy')
47 eb.add(self.new_part)
48 self.pack2(eb, resize=False, shrink=False)
49 self.show_all()
50@@ -201,7 +205,7 @@
51 GObject.type_register(DiskBox)
52
53
54-class PartitionBox(StylizedFrame):
55+class PartitionBox(Gtk.Alignment):
56 __gtype_name__ = 'PartitionBox'
57 __gproperties__ = {
58 'title': (
59@@ -243,7 +247,7 @@
60 # 4 px between the title and the extra heading
61 # 5 px between the extra heading and the size
62 # 12 px below the bottom-most element
63- StylizedFrame.__init__(self)
64+ Gtk.Alignment.__init__(self)
65 vbox = Gtk.Box()
66 vbox.set_orientation(Gtk.Orientation.VERTICAL)
67 self.logo = Gtk.Image.new_from_icon_name(icon_name,
68@@ -284,33 +288,6 @@
69 size = misc.format_size(size)
70 self.size.set_markup('<span size="x-large">%s</span>' % size)
71
72- def render_dots(self):
73- # FIXME: Dots are rendered over the frame.
74- s = cairo.ImageSurface(cairo.FORMAT_ARGB32, 2, 2)
75- cr = cairo.Context(s)
76- cr.set_source_rgb(*gtk_to_cairo_color('#b6b0a9'))
77- cr.rectangle(1, 1, 1, 1)
78- cr.fill()
79- pattern = cairo.SurfacePattern(s)
80- return pattern
81-
82- def paint_background(self, c):
83- StylizedFrame.paint_background(self, c)
84- a = self.get_allocation()
85- pattern = self.render_dots()
86- pattern.set_extend(cairo.EXTEND_REPEAT)
87- c.set_source(pattern)
88- c.fill_preserve()
89-
90- g = cairo.RadialGradient(a.width / 2, a.height / 2, 0, a.width / 2,
91- a.height / 2,
92- a.width > a.height and a.width or a.height)
93- g.add_color_stop_rgba(0.00, 1, 1, 1, 1.00)
94- g.add_color_stop_rgba(0.25, 1, 1, 1, 0.75)
95- g.add_color_stop_rgba(0.40, 1, 1, 1, 0.00)
96- c.set_source(g)
97- c.fill_preserve()
98-
99 GObject.type_register(PartitionBox)
100
101

Subscribers

People subscribed via source and target branches

to status/vote changes: