Bug 753736: GIMP Python green prompt is virtually...

... unreadable to those with certain type of color blindness
This commit is contained in:
Massimo Valentini 2016-07-13 16:53:34 +02:00 committed by Jehan
parent 4645a98915
commit e663526de9
3 changed files with 25 additions and 0 deletions

View File

@ -61,6 +61,7 @@ def do_console():
_("_Browse..."), RESPONSE_BROWSE, _("_Browse..."), RESPONSE_BROWSE,
gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)) gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE))
self.set_name (PROC_NAME)
self.set_alternative_button_order((gtk.RESPONSE_CLOSE, self.set_alternative_button_order((gtk.RESPONSE_CLOSE,
RESPONSE_BROWSE, RESPONSE_BROWSE,
RESPONSE_CLEAR, RESPONSE_CLEAR,
@ -68,7 +69,10 @@ def do_console():
self.cons = GimpConsole(quit_func=lambda: gtk.main_quit()) self.cons = GimpConsole(quit_func=lambda: gtk.main_quit())
self.style_set (None, None)
self.connect('response', self.response) self.connect('response', self.response)
self.connect('style-set', self.style_set)
self.browse_dlg = None self.browse_dlg = None
self.save_dlg = None self.save_dlg = None
@ -91,6 +95,11 @@ def do_console():
# so much whether the height will be exactly 40 characters. # so much whether the height will be exactly 40 characters.
self.set_default_size(width + sb_width + 2 * 12, height) 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): def response(self, dialog, response_id):
if response_id == RESPONSE_BROWSE: if response_id == RESPONSE_BROWSE:
self.browse() self.browse()

View File

@ -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 # EOF

View File

@ -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 # EOF