Alert: use GtkStyleContext instead of deprecated GtkStyle - SL #3907
Using the deprecated GtkStyle is giving an error [1] in the sugar alert. [1] http://bugs.sugarlabs.org/ticket/3907#comment:3 Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
This commit is contained in:
parent
9580e057cb
commit
76da9331a4
@ -369,8 +369,8 @@ class _TimeoutIcon(Gtk.Alignment):
|
|||||||
y = h * 0.5
|
y = h * 0.5
|
||||||
radius = w / 2
|
radius = w / 2
|
||||||
context.arc(x, y, radius, 0, 2 * math.pi)
|
context.arc(x, y, radius, 0, 2 * math.pi)
|
||||||
widget_style = self.get_style()
|
widget_style = self.get_style_context()
|
||||||
color = widget_style.bg[self.get_state()]
|
color = widget_style.get_background_color(self.get_state())
|
||||||
context.set_source_rgb(color.red, color.green, color.blue)
|
context.set_source_rgb(color.red, color.green, color.blue)
|
||||||
context.fill_preserve()
|
context.fill_preserve()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user