Merge lp:~osomon/software-center/search_box_text_color into lp:software-center

Proposed by Olivier Tilloy
Status: Merged
Merged at revision: not available
Proposed branch: lp:~osomon/software-center/search_box_text_color
Merge into: lp:software-center
Diff against target: 19 lines (+3/-0)
1 file modified
softwarecenter/view/widgets/searchentry.py (+3/-0)
To merge this branch: bzr merge lp:~osomon/software-center/search_box_text_color
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+23753@code.launchpad.net

Description of the change

This branch fixes bug #500174.
The fix was backported from the corresponding code in rhythmbox where it was originally copied from.

As a side note, I'm not convinced that the search entry's background color when not empty should be hardcoded to yellowish (or whichever value). I'd rather use a color defined in the current style for the sake of consistency. This should be assessed by a UI designer.

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

Thanks, I agree that hardcoding the color value is a bad idea. We need to fix this for maverick.

Revision history for this message
Michael Vogt (mvo) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/view/widgets/searchentry.py'
2--- softwarecenter/view/widgets/searchentry.py 2010-02-23 15:36:26 +0000
3+++ softwarecenter/view/widgets/searchentry.py 2010-04-20 09:32:22 +0000
4@@ -138,12 +138,15 @@
5 self.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, None)
6 # Based on the Rhythmbox code
7 yellowish = gtk.gdk.Color(63479, 63479, 48830)
8+ black = gtk.gdk.Color(0, 0, 0)
9 if self._a11y == True:
10 return
11 if self.get_text() == "":
12 self.modify_base(gtk.STATE_NORMAL, None)
13+ self.modify_text(gtk.STATE_NORMAL, None)
14 else:
15 self.modify_base(gtk.STATE_NORMAL, yellowish)
16+ self.modify_text(gtk.STATE_NORMAL, black)
17
18 def on_entry_changed(self, terms):
19 print terms