[gnome-clocks] Make sure the selection checkboxes use the right css
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] Make sure the selection checkboxes use the right css
- Date: Sun, 2 Dec 2012 13:31:42 +0000 (UTC)
commit 3c6181d65204cbe64d3324c7cf4657c1acab71c3
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Dec 2 14:30:32 2012 +0100
Make sure the selection checkboxes use the right css
gnomeclocks/widgets.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gnomeclocks/widgets.py b/gnomeclocks/widgets.py
index fa732a6..5033707 100644
--- a/gnomeclocks/widgets.py
+++ b/gnomeclocks/widgets.py
@@ -75,6 +75,7 @@ class DigitalClockRenderer(Gtk.CellRendererPixbuf):
Gtk.CellRendererPixbuf.do_render(self, cr, widget, background_area, cell_area, flags)
context = widget.get_style_context()
+
context.save()
context.add_class("clocks-digital-renderer")
context.add_class(self.css_class)
@@ -128,8 +129,11 @@ class DigitalClockRenderer(Gtk.CellRendererPixbuf):
Gtk.render_layout(context, cr, x, y + padding + text_h + subtext_pad,
layout_subtext)
+ context.restore()
+
# draw the overlayed checkbox
if self.toggle_visible:
+ context.save()
context.add_class(Gtk.STYLE_CLASS_CHECK)
xpad, ypad = self.get_padding()
@@ -148,8 +152,9 @@ class DigitalClockRenderer(Gtk.CellRendererPixbuf):
Gtk.render_check(context, cr, check_x, check_y, self.icon_size, self.icon_size)
+ context.restore()
+
cr.restore()
- context.restore()
def do_get_size(self, widget, cell_area):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]