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
=== modified file 'softwarecenter/view/widgets/searchentry.py'
--- softwarecenter/view/widgets/searchentry.py 2010-02-23 15:36:26 +0000
+++ softwarecenter/view/widgets/searchentry.py 2010-04-20 09:32:22 +0000
@@ -138,12 +138,15 @@
138 self.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, None)138 self.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, None)
139 # Based on the Rhythmbox code139 # Based on the Rhythmbox code
140 yellowish = gtk.gdk.Color(63479, 63479, 48830)140 yellowish = gtk.gdk.Color(63479, 63479, 48830)
141 black = gtk.gdk.Color(0, 0, 0)
141 if self._a11y == True:142 if self._a11y == True:
142 return143 return
143 if self.get_text() == "":144 if self.get_text() == "":
144 self.modify_base(gtk.STATE_NORMAL, None)145 self.modify_base(gtk.STATE_NORMAL, None)
146 self.modify_text(gtk.STATE_NORMAL, None)
145 else:147 else:
146 self.modify_base(gtk.STATE_NORMAL, yellowish)148 self.modify_base(gtk.STATE_NORMAL, yellowish)
149 self.modify_text(gtk.STATE_NORMAL, black)
147150
148def on_entry_changed(self, terms):151def on_entry_changed(self, terms):
149 print terms152 print terms