Merge lp:~kiwinote/software-center/tweaks4 into lp:software-center

Proposed by Kiwinote
Status: Merged
Merged at revision: 2775
Proposed branch: lp:~kiwinote/software-center/tweaks4
Merge into: lp:software-center
Diff against target: 75 lines (+9/-15)
4 files modified
data/ui/gtk3/css/softwarecenter.css (+4/-0)
debian/changelog (+1/-2)
softwarecenter/ui/gtk3/panes/viewswitcher.py (+1/-1)
softwarecenter/ui/gtk3/widgets/buttons.py (+3/-12)
To merge this branch: bzr merge lp:~kiwinote/software-center/tweaks4
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+93867@code.launchpad.net

Description of the change

this branch causes the channel selector menus to be themed natively (ie orange on hover etc) - also a few pixel tweaks

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks a bunch for this fix! It looks very good (and sorry for the delay in the review :/

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/ui/gtk3/css/softwarecenter.css'
2--- data/ui/gtk3/css/softwarecenter.css 2012-02-09 14:42:20 +0000
3+++ data/ui/gtk3/css/softwarecenter.css 2012-02-20 16:04:18 +0000
4@@ -79,3 +79,7 @@
5 border-width: 0;
6 padding: 0;
7 }
8+
9+#toolbar-popup {
10+ padding: 0;
11+}
12
13=== modified file 'debian/changelog'
14--- debian/changelog 2012-02-16 20:30:38 +0000
15+++ debian/changelog 2012-02-20 16:04:18 +0000
16@@ -11,13 +11,12 @@
17 with the latest debtags upstream plans
18
19 [ Kiwinote ]
20- * softwarecenter/ui/gtk3/widgets/buttons.py:
21- - draw the backgrounds of the channel selector menus (LP: #921477)
22 * softwarecenter/ui/gtk3/app.py:
23 - disable navigating back by pressing the backspace key because it has
24 started showing dodgy side effects - use ctrl+[ or alt+LEFT instead
25 * remember the scroll position when navigating back to a list view,
26 this only works in the available pane (LP: #852763)
27+ * correctly theme the channel selector menus (LP: #921477)
28
29 -- Kiwinote <kiwinote@gmail.com> Thu, 16 Feb 2012 14:08:17 +0000
30
31
32=== modified file 'softwarecenter/ui/gtk3/panes/viewswitcher.py'
33--- softwarecenter/ui/gtk3/panes/viewswitcher.py 2011-10-16 16:21:39 +0000
34+++ softwarecenter/ui/gtk3/panes/viewswitcher.py 2012-02-20 16:04:18 +0000
35@@ -237,7 +237,7 @@
36 label = Gtk.Label.new(channel.display_name)
37 image = Gtk.Image.new_from_icon_name(channel.icon, Gtk.IconSize.MENU)
38
39- box = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, StockEms.MEDIUM)
40+ box = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, StockEms.SMALL)
41 box.pack_start(image, False, False, 0)
42 box.pack_start(label, False, False, 0)
43
44
45=== modified file 'softwarecenter/ui/gtk3/widgets/buttons.py'
46--- softwarecenter/ui/gtk3/widgets/buttons.py 2012-02-16 20:18:16 +0000
47+++ softwarecenter/ui/gtk3/widgets/buttons.py 2012-02-20 16:04:18 +0000
48@@ -436,7 +436,7 @@
49 else:
50 tmpx = a.x + a.width - self.popup.get_allocation().width
51 x, y = window.get_root_coords(tmpx,
52- a.y + a.height + 1)
53+ a.y + a.height)
54 return (x, y, False)
55
56 a = self.section_button.get_allocation()
57@@ -451,18 +451,9 @@
58
59 def build_channel_selector(self):
60 self.popup = Gtk.Menu()
61+ self.popup.set_name('toolbar-popup') # to set 'padding: 0;'
62+ self.popup.get_style_context().add_class('primary-toolbar')
63 self.build_func(self.popup)
64- self.popup.attach_to_widget(self, None)
65- # draw themed bg for the popup menu to workaround bug
66- # #921477 - that looks like its actually a theme bug
67- context = self.get_ancestor('GtkToolbar').get_style_context()
68- color = context.get_border_color(Gtk.StateFlags.ACTIVE)
69- def draw(widget, cr):
70- a = widget.get_allocation()
71- cr.set_source_rgba(color.red, color.green, color.blue, color.alpha)
72- cr.rectangle(0, 0, a.width, a.height)
73- cr.fill()
74- self.popup.connect('draw', draw)
75 return
76
77

Subscribers

People subscribed via source and target branches