[gimp] plug-ins, themes: use the "normal text" color as stdout color of...



commit 657c39dc746bea7e2f5f666bc5affc34c27025b6
Author: Jehan <jehan girinstud io>
Date:   Tue Jan 9 18:41:59 2018 +0100

    plug-ins, themes: use the "normal text" color as stdout color of...
    
    ... the python console.
    It was using "selected text", which is most often inverted color (close
    if not identical to the background color). As a consequence, it made
    stdout output unreadable by default, forcing themes to always define a
    style for the python console. Using "normal text" is a much better
    choice to default to something readable from a parent style.
    
    As a consequence, I also removed "python-fu-console" styling from the
    System theme, where there should be as few theming as possible.

 plug-ins/pygimp/plug-ins/python-console.py |    2 +-
 themes/Dark/gtkrc                          |    2 +-
 themes/Darker/gtkrc                        |    2 +-
 themes/Gray/gtkrc                          |    2 +-
 themes/Light/gtkrc                         |    2 +-
 themes/Lighter/gtkrc                       |    2 +-
 themes/System/gtkrc                        |    8 --------
 7 files changed, 6 insertions(+), 14 deletions(-)
---
diff --git a/plug-ins/pygimp/plug-ins/python-console.py b/plug-ins/pygimp/plug-ins/python-console.py
index c39f1b2..88aa318 100755
--- a/plug-ins/pygimp/plug-ins/python-console.py
+++ b/plug-ins/pygimp/plug-ins/python-console.py
@@ -97,7 +97,7 @@ def do_console():
 
         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.stdout_tag.set_property ("foreground", style.text[gtk.STATE_NORMAL])
             self.cons.stderr_tag.set_property ("foreground", style.text[gtk.STATE_INSENSITIVE])
 
         def response(self, dialog, response_id):
diff --git a/themes/Dark/gtkrc b/themes/Dark/gtkrc
index d1ab23f..cb2ccab 100644
--- a/themes/Dark/gtkrc
+++ b/themes/Dark/gtkrc
@@ -2477,7 +2477,7 @@ widget "GtkMenuItem" style "ubuntu-fix-menu-item"
 
 style "dark-python-console"
 {
-  text[SELECTED] = "#8f8"
+  text[NORMAL] = "#8f8"
   text[INSENSITIVE] = "#f88"
 }
 
diff --git a/themes/Darker/gtkrc b/themes/Darker/gtkrc
index bf0a3ab..89d5853 100644
--- a/themes/Darker/gtkrc
+++ b/themes/Darker/gtkrc
@@ -2503,7 +2503,7 @@ widget "GtkMenuItem" style "ubuntu-fix-menu-item"
 
 style "dark-python-console"
 {
-  text[SELECTED] = "#8f8"
+  text[NORMAL] = "#8f8"
   text[INSENSITIVE] = "#f88"
 }
 
diff --git a/themes/Gray/gtkrc b/themes/Gray/gtkrc
index 5085f97..948f0c4 100644
--- a/themes/Gray/gtkrc
+++ b/themes/Gray/gtkrc
@@ -2514,7 +2514,7 @@ widget "GtkMenuItem" style "ubuntu-fix-menu-item"
 
 style "gray-python-console"
 {
-  text[SELECTED] = "#080"
+  text[NORMAL] = "#080"
   text[INSENSITIVE] = "#800"
 }
 
diff --git a/themes/Light/gtkrc b/themes/Light/gtkrc
index c487181..bf111e3 100644
--- a/themes/Light/gtkrc
+++ b/themes/Light/gtkrc
@@ -2514,7 +2514,7 @@ widget "GtkMenuItem" style "ubuntu-fix-menu-item"
 
 style "light-python-console"
 {
-  text[SELECTED] = "#080"
+  text[NORMAL] = "#080"
   text[INSENSITIVE] = "#800"
 }
 
diff --git a/themes/Lighter/gtkrc b/themes/Lighter/gtkrc
index 0841f39..11454d3 100644
--- a/themes/Lighter/gtkrc
+++ b/themes/Lighter/gtkrc
@@ -2520,7 +2520,7 @@ widget "GtkMenuItem" style "ubuntu-fix-menu-item"
 
 style "light-python-console"
 {
-  text[SELECTED] = "#080"
+  text[NORMAL] = "#080"
   text[INSENSITIVE] = "#800"
 }
 
diff --git a/themes/System/gtkrc b/themes/System/gtkrc
index 1bc7497..3da549e 100644
--- a/themes/System/gtkrc
+++ b/themes/System/gtkrc
@@ -105,11 +105,3 @@ style "gimp-display-style" = "gimp-default-style"
 }
 
 widget "*GimpDisplayShell.*" style "gimp-display-style"
-
-style "gimp-python-console"
-{
-  text[SELECTED] = "#080"
-  text[INSENSITIVE] = "#800"
-}
-
-widget "python-fu-console" style "gimp-python-console"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]