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
=== modified file 'data/ui/gtk3/css/softwarecenter.css'
--- data/ui/gtk3/css/softwarecenter.css 2012-02-09 14:42:20 +0000
+++ data/ui/gtk3/css/softwarecenter.css 2012-02-20 16:04:18 +0000
@@ -79,3 +79,7 @@
79 border-width: 0;79 border-width: 0;
80 padding: 0;80 padding: 0;
81}81}
82
83#toolbar-popup {
84 padding: 0;
85}
8286
=== modified file 'debian/changelog'
--- debian/changelog 2012-02-16 20:30:38 +0000
+++ debian/changelog 2012-02-20 16:04:18 +0000
@@ -11,13 +11,12 @@
11 with the latest debtags upstream plans11 with the latest debtags upstream plans
1212
13 [ Kiwinote ]13 [ Kiwinote ]
14 * softwarecenter/ui/gtk3/widgets/buttons.py:
15 - draw the backgrounds of the channel selector menus (LP: #921477)
16 * softwarecenter/ui/gtk3/app.py:14 * softwarecenter/ui/gtk3/app.py:
17 - disable navigating back by pressing the backspace key because it has15 - disable navigating back by pressing the backspace key because it has
18 started showing dodgy side effects - use ctrl+[ or alt+LEFT instead16 started showing dodgy side effects - use ctrl+[ or alt+LEFT instead
19 * remember the scroll position when navigating back to a list view,17 * remember the scroll position when navigating back to a list view,
20 this only works in the available pane (LP: #852763)18 this only works in the available pane (LP: #852763)
19 * correctly theme the channel selector menus (LP: #921477)
2120
22 -- Kiwinote <kiwinote@gmail.com> Thu, 16 Feb 2012 14:08:17 +000021 -- Kiwinote <kiwinote@gmail.com> Thu, 16 Feb 2012 14:08:17 +0000
2322
2423
=== modified file 'softwarecenter/ui/gtk3/panes/viewswitcher.py'
--- softwarecenter/ui/gtk3/panes/viewswitcher.py 2011-10-16 16:21:39 +0000
+++ softwarecenter/ui/gtk3/panes/viewswitcher.py 2012-02-20 16:04:18 +0000
@@ -237,7 +237,7 @@
237 label = Gtk.Label.new(channel.display_name)237 label = Gtk.Label.new(channel.display_name)
238 image = Gtk.Image.new_from_icon_name(channel.icon, Gtk.IconSize.MENU)238 image = Gtk.Image.new_from_icon_name(channel.icon, Gtk.IconSize.MENU)
239239
240 box = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, StockEms.MEDIUM)240 box = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, StockEms.SMALL)
241 box.pack_start(image, False, False, 0)241 box.pack_start(image, False, False, 0)
242 box.pack_start(label, False, False, 0)242 box.pack_start(label, False, False, 0)
243243
244244
=== modified file 'softwarecenter/ui/gtk3/widgets/buttons.py'
--- softwarecenter/ui/gtk3/widgets/buttons.py 2012-02-16 20:18:16 +0000
+++ softwarecenter/ui/gtk3/widgets/buttons.py 2012-02-20 16:04:18 +0000
@@ -436,7 +436,7 @@
436 else:436 else:
437 tmpx = a.x + a.width - self.popup.get_allocation().width437 tmpx = a.x + a.width - self.popup.get_allocation().width
438 x, y = window.get_root_coords(tmpx,438 x, y = window.get_root_coords(tmpx,
439 a.y + a.height + 1)439 a.y + a.height)
440 return (x, y, False)440 return (x, y, False)
441441
442 a = self.section_button.get_allocation()442 a = self.section_button.get_allocation()
@@ -451,18 +451,9 @@
451451
452 def build_channel_selector(self):452 def build_channel_selector(self):
453 self.popup = Gtk.Menu()453 self.popup = Gtk.Menu()
454 self.popup.set_name('toolbar-popup') # to set 'padding: 0;'
455 self.popup.get_style_context().add_class('primary-toolbar')
454 self.build_func(self.popup)456 self.build_func(self.popup)
455 self.popup.attach_to_widget(self, None)
456 # draw themed bg for the popup menu to workaround bug
457 # #921477 - that looks like its actually a theme bug
458 context = self.get_ancestor('GtkToolbar').get_style_context()
459 color = context.get_border_color(Gtk.StateFlags.ACTIVE)
460 def draw(widget, cr):
461 a = widget.get_allocation()
462 cr.set_source_rgba(color.red, color.green, color.blue, color.alpha)
463 cr.rectangle(0, 0, a.width, a.height)
464 cr.fill()
465 self.popup.connect('draw', draw)
466 return457 return
467458
468459

Subscribers

People subscribed via source and target branches