Merge lp:~mpt/software-center/fit-and-finish-2 into lp:software-center

Proposed by Matthew Paul Thomas
Status: Merged
Merged at revision: 1063
Proposed branch: lp:~mpt/software-center/fit-and-finish-2
Merge into: lp:software-center
Diff against target: 161 lines (+10/-44)
4 files modified
softwarecenter/view/appdetailsview_gtk.py (+5/-5)
softwarecenter/view/widgets/mkit.py (+1/-10)
softwarecenter/view/widgets/pathbar_gtk_atk.py (+1/-6)
softwarecenter/view/widgets/searchentry.py (+3/-23)
To merge this branch: bzr merge lp:~mpt/software-center/fit-and-finish-2
Reviewer Review Type Date Requested Status
software-store-developers Pending
Review via email: mp+33751@code.launchpad.net

Description of the change

- Uses the same size text for all elements in the installation state bar.
- Shortens "Find it in the menu at:" to "Find it in the menu:", and removes the italics.
- Lessens the visual punishment for applications with too-small icons.
- Stops changing the search field color whenever it's being used.

To post a comment you must log in.
1057. By Matthew Paul Thomas

Fixes bug 623460 (Pathbutton element that doesn't do anything is strongly highlighted).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/view/appdetailsview_gtk.py'
2--- softwarecenter/view/appdetailsview_gtk.py 2010-08-26 09:04:43 +0000
3+++ softwarecenter/view/appdetailsview_gtk.py 2010-08-26 12:49:54 +0000
4@@ -1411,7 +1411,7 @@
5 where = searcher.get_main_menu_path(self.app_details.desktop_file)
6 if not where:
7 return
8- label = gtk.Label(_("Find it in "))
9+ label = gtk.Label(_("Find it in the menu: "))
10 self.desc_installed_where.pack_start(label, False, False)
11 for (i, item) in enumerate(where):
12 iconname = item.get_icon()
13@@ -1421,7 +1421,8 @@
14 self.desc_installed_where.pack_start(image, False, False)
15
16 label_name = gtk.Label()
17- label_name.set_markup('<i>%s</i>' % gobject.markup_escape_text(item.get_name()))
18+ label_name.set_markup(
19+ gobject.markup_escape_text(item.get_name()))
20 self.desc_installed_where.pack_start(label_name, False, False)
21 if i+1 < len(where):
22 right_arrow = gtk.Arrow(gtk.ARROW_RIGHT, gtk.SHADOW_NONE)
23@@ -1630,13 +1631,12 @@
24
25 rr.layout(cr, a.x, a.y, a.x+a.width, a.y+a.height, radius=3)
26 cr.set_source_rgb(*mkit.floats_from_gdkcolor(self.style.base[0]))
27- cr.fill()
28
29 cr.save()
30
31 # line width should be 0.05em but for the sake of simplicity
32- # make it 1 pixel
33- cr.set_line_width(1)
34+ # make it 0.25 pixels
35+ cr.set_line_width(0.25)
36 cr.translate(0.5, 0.5)
37
38 r,g,b = mkit.floats_from_gdkcolor(self.style.dark[self.state])
39
40=== modified file 'softwarecenter/view/widgets/mkit.py'
41--- softwarecenter/view/widgets/mkit.py 2010-08-26 08:12:29 +0000
42+++ softwarecenter/view/widgets/mkit.py 2010-08-26 12:49:54 +0000
43@@ -571,10 +571,6 @@
44 curv = self["curvature"]
45 aw = self["arrow-width"]
46
47- if CACHED_THEME_NAME == 'Ambiance-maverick-beta':
48- if state == gtk.STATE_PRELIGHT and part.is_active:
49- state = gtk.STATE_SELECTED
50-
51 cr.save()
52 cr.rectangle(x, y, w+1, h)
53
54@@ -582,12 +578,7 @@
55 cr.translate(x-sxO, y)
56
57 # bg linear vertical gradient
58- if state != gtk.STATE_ACTIVE or not part.is_active:
59- color1, color2 = self.gradients[state]
60- elif state == gtk.STATE_ACTIVE and part.is_active:
61- color1, color2 = self.gradients[gtk.STATE_SELECTED]
62- #color1 = color2
63- color1 = color2.shade(1.1)
64+ color1, color2 = self.gradients[state]
65
66 shape.layout(cr, 1, 1, w, h-1, arrow_width=aw, radius=curv)
67 lin = cairo.LinearGradient(0, 0, 0, h)
68
69=== modified file 'softwarecenter/view/widgets/pathbar_gtk_atk.py'
70--- softwarecenter/view/widgets/pathbar_gtk_atk.py 2010-08-20 06:48:31 +0000
71+++ softwarecenter/view/widgets/pathbar_gtk_atk.py 2010-08-26 12:49:54 +0000
72@@ -147,10 +147,7 @@
73 return
74
75 def _part_leave_notify(self, part, event):
76- if part == self._active_part:
77- part.set_state(gtk.STATE_SELECTED)
78- else:
79- part.set_state(gtk.STATE_NORMAL)
80+ part.set_state(gtk.STATE_NORMAL)
81 self._part_queue_draw(part)
82 return
83
84@@ -190,7 +187,6 @@
85 # react to spacebar, enter, numpad-enter
86 if event.keyval in (32, 65293, 65421):
87 self.set_active(part)
88- part.set_state(gtk.STATE_SELECTED)
89 self._part_queue_draw(part)
90 return
91
92@@ -464,7 +460,6 @@
93 self._active_part.set_state(gtk.STATE_NORMAL)
94 self._part_queue_draw(self._active_part)
95
96- part.set_state(gtk.STATE_SELECTED)
97 self._part_queue_draw(part)
98 self._active_part = part
99 if do_callback and part.callback:
100
101=== modified file 'softwarecenter/view/widgets/searchentry.py'
102--- softwarecenter/view/widgets/searchentry.py 2010-04-20 09:25:44 +0000
103+++ softwarecenter/view/widgets/searchentry.py 2010-08-26 12:49:54 +0000
104@@ -1,7 +1,6 @@
105 # coding: utf-8
106 #
107-# SearchEntry - An enhanced search entry with alternating background colouring
108-# and timeout support
109+# SearchEntry - An enhanced search entry with timeout
110 #
111 # Copyright (C) 2007 Sebastian Heinlein
112 # 2007-2009 Canonical Ltd.
113@@ -38,8 +37,7 @@
114
115 def __init__(self, icon_theme=None):
116 """
117- Creates an enhanced IconEntry that supports a time out when typing
118- and uses a different background colour when the search is active
119+ Creates an enhanced IconEntry that triggers a timeout when typing
120 """
121 gtk.Entry.__init__(self)
122 if not icon_theme:
123@@ -51,12 +49,6 @@
124 self.set_icon_from_stock(gtk.ENTRY_ICON_PRIMARY, gtk.STOCK_FIND)
125 self.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, None)
126
127- # Do not draw a yellow bg if an a11y theme is used
128- settings = gtk.settings_get_default()
129- theme = settings.get_property("gtk-theme-name")
130- self._a11y = (theme.startswith("HighContrast") or
131- theme.startswith("LowContrast"))
132-
133 # set sensible atk name
134 atk_desc = self.get_accessible()
135 atk_desc.set_name(_("Search"))
136@@ -129,24 +121,12 @@
137
138 def _check_style(self):
139 """
140- Use a different background colour if a search is active
141+ Show the clear icon whenever the field is not empty
142 """
143- # show/hide icon
144 if self.get_text() != "":
145 self.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, gtk.STOCK_CLEAR)
146 else:
147 self.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, None)
148- # Based on the Rhythmbox code
149- yellowish = gtk.gdk.Color(63479, 63479, 48830)
150- black = gtk.gdk.Color(0, 0, 0)
151- if self._a11y == True:
152- return
153- if self.get_text() == "":
154- self.modify_base(gtk.STATE_NORMAL, None)
155- self.modify_text(gtk.STATE_NORMAL, None)
156- else:
157- self.modify_base(gtk.STATE_NORMAL, yellowish)
158- self.modify_text(gtk.STATE_NORMAL, black)
159
160 def on_entry_changed(self, terms):
161 print terms