[gnome-clocks] Hack to work around probable gtk bug
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] Hack to work around probable gtk bug
- Date: Thu, 16 Aug 2012 22:47:45 +0000 (UTC)
commit 7b8f7be29d1a98b0b2f6660e8bf857584ab0880c
Author: Paolo Borelli <pborelli gnome org>
Date: Fri Aug 17 00:44:44 2012 +0200
Hack to work around probable gtk bug
When we set the style class of the button, the style context of the
label inside the button does not get recalculated. I think this may be
a gtk bug... this ugly workaround seems to work for now.
gnomeclocks/timer.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gnomeclocks/timer.py b/gnomeclocks/timer.py
index 6e69bdb..8c1e543 100644
--- a/gnomeclocks/timer.py
+++ b/gnomeclocks/timer.py
@@ -136,6 +136,10 @@ class TimerScreen (Gtk.Box):
self.leftLabel.set_markup(TIMER_BUTTON_MARKUP % (_("Pause")))
self.leftButton.get_style_context ().remove_class ("clocks-go")
+ # FIXME: work around the fact that gtk does recalculate the label style
+ # if the button class changes
+ self.leftLabel.get_style_context ().invalidate ()
+
class TimerWelcomeScreen (Gtk.Box):
def __init__ (self, timer):
super(TimerWelcomeScreen, self).__init__ ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]