[gimp] Bug 753736: GIMP Python green prompt is virtually...
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 753736: GIMP Python green prompt is virtually...
- Date: Tue, 9 Jan 2018 17:22:16 +0000 (UTC)
commit e663526de90ac2caf5fbd0a720f813eba21663d9
Author: Massimo Valentini <mvalentini src gnome org>
Date: Wed Jul 13 16:53:34 2016 +0200
Bug 753736: GIMP Python green prompt is virtually...
... unreadable to those with certain type of color blindness
plug-ins/pygimp/plug-ins/python-console.py | 9 +++++++++
themes/Dark/gtkrc | 8 ++++++++
themes/Light/gtkrc | 8 ++++++++
3 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/pygimp/plug-ins/python-console.py b/plug-ins/pygimp/plug-ins/python-console.py
index 6053b8e..c39f1b2 100755
--- a/plug-ins/pygimp/plug-ins/python-console.py
+++ b/plug-ins/pygimp/plug-ins/python-console.py
@@ -61,6 +61,7 @@ def do_console():
_("_Browse..."), RESPONSE_BROWSE,
gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE))
+ self.set_name (PROC_NAME)
self.set_alternative_button_order((gtk.RESPONSE_CLOSE,
RESPONSE_BROWSE,
RESPONSE_CLEAR,
@@ -68,7 +69,10 @@ def do_console():
self.cons = GimpConsole(quit_func=lambda: gtk.main_quit())
+ self.style_set (None, None)
+
self.connect('response', self.response)
+ self.connect('style-set', self.style_set)
self.browse_dlg = None
self.save_dlg = None
@@ -91,6 +95,11 @@ def do_console():
# so much whether the height will be exactly 40 characters.
self.set_default_size(width + sb_width + 2 * 12, height)
+ def style_set(self, old_style, user_data):
+ style = self.get_style ()
+ self.cons.stdout_tag.set_property ("foreground", style.text[gtk.STATE_SELECTED])
+ self.cons.stderr_tag.set_property ("foreground", style.text[gtk.STATE_INSENSITIVE])
+
def response(self, dialog, response_id):
if response_id == RESPONSE_BROWSE:
self.browse()
diff --git a/themes/Dark/gtkrc b/themes/Dark/gtkrc
index ac370de..d1ab23f 100644
--- a/themes/Dark/gtkrc
+++ b/themes/Dark/gtkrc
@@ -2475,4 +2475,12 @@ widget "GtkMenuItem" style "ubuntu-fix-menu-item"
###########################################################
+style "dark-python-console"
+{
+ text[SELECTED] = "#8f8"
+ text[INSENSITIVE] = "#f88"
+}
+
+widget "python-fu-console" style "dark-python-console"
+
# EOF
diff --git a/themes/Light/gtkrc b/themes/Light/gtkrc
index 457a0d0..c487181 100644
--- a/themes/Light/gtkrc
+++ b/themes/Light/gtkrc
@@ -2512,4 +2512,12 @@ widget "GtkMenuItem" style "ubuntu-fix-menu-item"
###########################################################
+style "light-python-console"
+{
+ text[SELECTED] = "#080"
+ text[INSENSITIVE] = "#800"
+}
+
+widget "python-fu-console" style "light-python-console"
+
# EOF
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]