[meld] Fix MsgArea display on bad fg/bg tooltip colours (closes bgo#662500)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Fix MsgArea display on bad fg/bg tooltip colours (closes bgo#662500)
- Date: Sun, 1 Jan 2012 04:25:21 +0000 (UTC)
commit 076ffa5aa5874ddd4488aeb48ceb2be6f8a5987b
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Jan 1 14:06:40 2012 +1000
Fix MsgArea display on bad fg/bg tooltip colours (closes bgo#662500)
In situations where the tooltip foreground and background colours are
set independently of the main text colour, the MsgArea popups could be
unreadable, because gtk.Labels contained in a tooltip don't inherit
its styling properly - or at least not in some engines. This affects
the Ubuntu Ambience dark theme.
meld/ui/msgarea.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/meld/ui/msgarea.py b/meld/ui/msgarea.py
index 31317fe..35281ea 100644
--- a/meld/ui/msgarea.py
+++ b/meld/ui/msgarea.py
@@ -39,6 +39,7 @@ class MsgArea(gtk.HBox):
super(MsgArea, self).__init__(**kwargs)
self.__contents = None
+ self.__labels = []
self.__changing_style = False
self.__main_hbox = gtk.HBox(False, 16) # FIXME: use style properties
@@ -109,6 +110,8 @@ class MsgArea(gtk.HBox):
self.__changing_style = True
self.set_style(style)
+ for label in self.__labels:
+ label.set_style(style)
self.__changing_style = False
window.destroy()
@@ -195,6 +198,8 @@ class MsgArea(gtk.HBox):
vbox.show()
hbox_content.pack_start (vbox, True, True, 0)
+ self.__labels = []
+
primary_markup = "<b>%s</b>" % (primary_text,)
primary_label = WrapLabel(primary_markup)
primary_label.show()
@@ -204,6 +209,7 @@ class MsgArea(gtk.HBox):
primary_label.set_alignment(0, 0.5)
primary_label.set_flags(gtk.CAN_FOCUS)
primary_label.set_selectable(True)
+ self.__labels.append(primary_label)
if secondary_text:
secondary_markup = "<small>%s</small>" % (secondary_text,)
@@ -215,6 +221,7 @@ class MsgArea(gtk.HBox):
secondary_label.set_line_wrap(True)
secondary_label.set_selectable(True)
secondary_label.set_alignment(0, 0.5)
+ self.__labels.append(secondary_label)
self.set_contents(hbox_content)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]